Sha256: ac6bda8c6035973a0103ad61cf648c7b1960b1df8b921a82c6451e0f006aff3c

Contents?: true

Size: 312 Bytes

Versions: 2

Compression:

Stored size: 312 Bytes

Contents

module AddMethodMissing
  def add_method_missing(name = :klass)
    before do
      # when #optimize delegates to super, it would normally
      # explode, so define method_missing to return self
      send(name).class_eval do
        def method_missing(*)
          self
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
veritas-0.0.2 spec/support/add_method_missing.rb
veritas-0.0.1 spec/support/add_method_missing.rb