Sha256: dc6e9058de5ad0abb5d67f1643add8a6a2bc28d1f1deb05d137819bde1d26308

Contents?: true

Size: 517 Bytes

Versions: 14

Compression:

Stored size: 517 Bytes

Contents

module ActiveSupport
  class OptionMerger #:nodoc:
    instance_methods.each do |method|
      undef_method(method) if method !~ /^(__|instance_eval|class|object_id)/
    end

    def initialize(context, options)
      @context, @options = context, options
    end

    private
      def method_missing(method, *arguments, &block)
        arguments << (arguments.last.respond_to?(:to_hash) ? @options.deep_merge(arguments.pop) : @options.dup)
        @context.__send__(method, *arguments, &block)
      end
  end
end

Version data entries

14 entries across 13 versions & 8 rubygems

Version Path
p8-castronaut-0.6.1.1 vendor/activesupport/lib/active_support/option_merger.rb
relevance-castronaut-0.6.0 vendor/activesupport/lib/active_support/option_merger.rb
relevance-castronaut-0.6.1 vendor/activesupport/lib/active_support/option_merger.rb
relevance-castronaut-0.7.4 vendor/activesupport/lib/active_support/option_merger.rb
relevance-castronaut-0.7.5 vendor/activesupport/lib/active_support/option_merger.rb
nbudin-castronaut-0.7.5 vendor/activesupport/lib/active_support/option_merger.rb
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/activesupport/pkg/activesupport-2.2.2/lib/active_support/option_merger.rb
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/activesupport/lib/active_support/option_merger.rb
factorylabs-castronaut-0.7.5 vendor/activesupport/lib/active_support/option_merger.rb
activesupport-2.2.3 lib/active_support/option_merger.rb
activesupport-2.2.2 lib/active_support/option_merger.rb
mack-active_record-0.8.2 lib/gems/activesupport-2.2.2/lib/active_support/option_merger.rb
mack-facets-0.8.3 lib/gems/activesupport-2.2.2/lib/active_support/option_merger.rb
mack-facets-0.8.3.1 lib/gems/activesupport-2.2.2/lib/active_support/option_merger.rb