Class: RBelly::Runtime::RubyFunction

Inherits:
Object
  • Object
show all
Defined in:
lib/rbelly/runtime/ruby_function.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ RubyFunction

Returns a new instance of RubyFunction.



4
5
6
# File 'lib/rbelly/runtime/ruby_function.rb', line 4

def initialize(&block)
  @code = block
end

Instance Method Details

#call(chain, *args) ⇒ Object



8
9
10
# File 'lib/rbelly/runtime/ruby_function.rb', line 8

def call(chain, *args)
  @code.call(*args)
end