Changeset 7659
- Timestamp:
- 09/27/07 10:41:12 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activesupport/lib/active_support/option_merger.rb
r7474 r7659 1 1 module ActiveSupport 2 2 class OptionMerger #:nodoc: 3 instance_methods.each do |method| 3 instance_methods.each do |method| 4 4 undef_method(method) if method !~ /^(__|instance_eval|class|object_id)/ 5 5 end 6 6 7 7 def initialize(context, options) 8 8 @context, @options = context, options 9 9 end 10 10 11 11 private 12 12 def method_missing(method, *arguments, &block) 13 13 merge_argument_options! arguments 14 @context.send (method, *arguments, &block)14 @context.send!(method, *arguments, &block) 15 15 end 16 16 17 17 def merge_argument_options!(arguments) 18 18 arguments << if arguments.last.respond_to? :to_hash … … 20 20 else 21 21 @options.dup 22 end 22 end 23 23 end 24 24 end trunk/activesupport/lib/active_support/values/time_zone.rb
r4386 r7659 77 77 def create(name, offset) 78 78 zone = allocate 79 zone.send :initialize, name, offset79 zone.send!(:initialize, name, offset) 80 80 zone 81 81 end