From da62a7c5362ee76e8fdc8cb942c4c1eefccfeab0 Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Tue, 27 Oct 2009 16:46:45 -0700 Subject: Duplicate AS code no longer needed --- railties/lib/rails/core.rb | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'railties/lib/rails/core.rb') diff --git a/railties/lib/rails/core.rb b/railties/lib/rails/core.rb index 6e7f912e6d..a5e51ad04a 100644 --- a/railties/lib/rails/core.rb +++ b/railties/lib/rails/core.rb @@ -70,36 +70,4 @@ module Rails @@public_path = path end end - - class OrderedOptions < Array #:nodoc: - def []=(key, value) - key = key.to_sym - - if pair = find_pair(key) - pair.pop - pair << value - else - self << [key, value] - end - end - - def [](key) - pair = find_pair(key.to_sym) - pair ? pair.last : nil - end - - def method_missing(name, *args) - if name.to_s =~ /(.*)=$/ - self[$1.to_sym] = args.first - else - self[name] - end - end - - private - def find_pair(key) - self.each { |i| return i if i.first == key } - return false - end - end end \ No newline at end of file -- cgit v1.2.3