Module: Johnson::RubyLandProxy::Callable

Defined in:
lib/johnson/ruby_land_proxy.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.test?(proxy) ⇒ Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/johnson/ruby_land_proxy.rb', line 46

def self.test?(proxy)
  proxy.respond_to?(:call_using)
end

Instance Method Details

#call(*args) ⇒ Object



54
55
56
# File 'lib/johnson/ruby_land_proxy.rb', line 54

def call(*args)
  call_using(runtime.global, *args)
end

#to_procObject



50
51
52
# File 'lib/johnson/ruby_land_proxy.rb', line 50

def to_proc
  @proc ||= Proc.new { |*args| call(*args) }
end