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
30 31 32 |
# File 'lib/johnson/ruby_land_proxy.rb', line 30 def self.test?(proxy) proxy.respond_to?(:call_using) end |
Instance Method Details
#call(*args) ⇒ Object
38 39 40 |
# File 'lib/johnson/ruby_land_proxy.rb', line 38 def call(*args) call_using(runtime.global, *args) end |
#to_proc ⇒ Object
34 35 36 |
# File 'lib/johnson/ruby_land_proxy.rb', line 34 def to_proc @proc ||= Proc.new { |*args| call(*args) } end |