Sha256: ea21ff213d764a7fae524df31fe3a3dfd6557e60c8c305ca8a5dd1b5c3e3db5b

Contents?: true

Size: 648 Bytes

Versions: 46

Compression:

Stored size: 648 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)
        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

46 entries across 46 versions & 9 rubygems

Version Path
3mix-castronaut-0.5.0.2 vendor/activesupport/lib/active_support/option_merger.rb
masover-castronaut-0.4.4.4 vendor/activesupport/lib/active_support/option_merger.rb
masover-castronaut-0.4.4.5 vendor/activesupport/lib/active_support/option_merger.rb
masover-castronaut-0.5.0.1 vendor/activesupport/lib/active_support/option_merger.rb
relevance-castronaut-0.4.1 vendor/activesupport/lib/active_support/option_merger.rb
relevance-castronaut-0.4.2 vendor/activesupport/lib/active_support/option_merger.rb
relevance-castronaut-0.4.3 vendor/activesupport/lib/active_support/option_merger.rb
relevance-castronaut-0.4.4 vendor/activesupport/lib/active_support/option_merger.rb
relevance-castronaut-0.4.5 vendor/activesupport/lib/active_support/option_merger.rb
relevance-castronaut-0.4.6 vendor/activesupport/lib/active_support/option_merger.rb
relevance-castronaut-0.5.0 vendor/activesupport/lib/active_support/option_merger.rb
relevance-castronaut-0.5.1 vendor/activesupport/lib/active_support/option_merger.rb
relevance-castronaut-0.5.2 vendor/activesupport/lib/active_support/option_merger.rb
relevance-castronaut-0.5.3 vendor/activesupport/lib/active_support/option_merger.rb
relevance-castronaut-0.5.4 vendor/activesupport/lib/active_support/option_merger.rb
radiant-0.7.2 vendor/rails/activesupport/lib/active_support/option_merger.rb
vibes-bj-1.2.2 spec/rails_root/vendor/rails/activesupport/lib/active_support/option_merger.rb
vibes-bj-1.2.1 spec/rails_root/vendor/rails/activesupport/lib/active_support/option_merger.rb
activesupport-2.0.1 lib/active_support/option_merger.rb
activesupport-2.0.0 lib/active_support/option_merger.rb