Sha256: 2dc3543447b2d4b7f6331c40669e255f695b5667363b5691ad8c16ed40e5f92e

Contents?: true

Size: 463 Bytes

Versions: 12

Compression:

Stored size: 463 Bytes

Contents

module RR
  class ScenarioMethodProxy
    def initialize(space, creator, object, &block)
      @space = space
      @creator = creator
      @object = object
      class << self
        instance_methods.each do |m|
          undef_method m unless m =~ /^__/
        end

        def method_missing(method_name, *args, &block)
          @creator.create!(@object, method_name, *args, &block)
        end
      end
      yield(self) if block_given?
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rr-0.3.0 lib/rr/scenario_method_proxy.rb
rr-0.3.4 lib/rr/scenario_method_proxy.rb
rr-0.3.2 lib/rr/scenario_method_proxy.rb
rr-0.3.1 lib/rr/scenario_method_proxy.rb
rr-0.3.11 lib/rr/scenario_method_proxy.rb
rr-0.3.10 lib/rr/scenario_method_proxy.rb
rr-0.3.3 lib/rr/scenario_method_proxy.rb
rr-0.3.8 lib/rr/scenario_method_proxy.rb
rr-0.3.6 lib/rr/scenario_method_proxy.rb
rr-0.3.5 lib/rr/scenario_method_proxy.rb
rr-0.3.7 lib/rr/scenario_method_proxy.rb
rr-0.3.9 lib/rr/scenario_method_proxy.rb