Sha256: 8770744937dea13cb5bfa0b3157a66b40fc8f952750a9f2f4a903d63ba5e1aa0

Contents?: true

Size: 654 Bytes

Versions: 76

Compression:

Stored size: 654 Bytes

Contents

module ActiveSupport
  class OptionMerger #:nodoc:
    instance_methods.each do |method| 
      undef_method(method) if method !~ /^(__|instance_eval|class)/
    end
    
    def initialize(context, options)
      @context, @options = context, options
    end
    
    private
      def method_missing(method, *arguments, &block)
        merge_argument_options! arguments
        @context.send(method, *arguments, &block)
      end
      
      def merge_argument_options!(arguments)
        arguments << if arguments.last.respond_to? :to_hash
          @options.merge(arguments.pop)
        else
          @options.dup
        end  
      end
  end
end

Version data entries

76 entries across 76 versions & 5 rubygems

Version Path
jstorimer-deep-test-2.0.0 sample_rails_project/vendor/rails/activesupport/lib/active_support/option_merger.rb
jstorimer-deep-test-1.4.0 sample_rails_project/vendor/rails/activesupport/lib/active_support/option_merger.rb
jstorimer-deep-test-1.3.0 sample_rails_project/vendor/rails/activesupport/lib/active_support/option_merger.rb
jstorimer-deep-test-1.2.0 sample_rails_project/vendor/rails/activesupport/lib/active_support/option_merger.rb
jstorimer-deep-test-1.1.0 sample_rails_project/vendor/rails/activesupport/lib/active_support/option_merger.rb
jstorimer-deep-test-1.0.0 sample_rails_project/vendor/rails/activesupport/lib/active_support/option_merger.rb
jstorimer-deep-test-0.2.0 sample_rails_project/vendor/rails/activesupport/lib/active_support/option_merger.rb
jstorimer-deep-test-0.1.0 sample_rails_project/vendor/rails/activesupport/lib/active_support/option_merger.rb
activesupport-1.4.1 lib/active_support/option_merger.rb
activesupport-1.4.2 lib/active_support/option_merger.rb
activesupport-1.4.3 lib/active_support/option_merger.rb
activesupport-1.4.4 lib/active_support/option_merger.rb
activesupport-1.4.0 lib/active_support/option_merger.rb
backlog-0.0.0 vendor/rails/activesupport/lib/active_support/option_merger.rb
backlog-0.0.1 vendor/rails/activesupport/lib/active_support/option_merger.rb
backlog-0.0.2 vendor/rails/activesupport/lib/active_support/option_merger.rb
backlog-0.0.4 vendor/rails/activesupport/lib/active_support/option_merger.rb
backlog-0.0.5 vendor/rails/activesupport/lib/active_support/option_merger.rb
backlog-0.1.1 vendor/rails/activesupport/lib/active_support/option_merger.rb
backlog-0.1.0 vendor/rails/activesupport/lib/active_support/option_merger.rb