Class: Malachite::Function
- Inherits:
-
Object
- Object
- Malachite::Function
- Defined in:
- lib/malachite/function.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(name, args) ⇒ Function
constructor
A new instance of Function.
Constructor Details
#initialize(name, args) ⇒ Function
Returns a new instance of Function.
5 6 7 8 |
# File 'lib/malachite/function.rb', line 5 def initialize(name, args) @name = name @args = args end |
Instance Method Details
#call ⇒ Object
10 11 12 |
# File 'lib/malachite/function.rb', line 10 def call Malachite.from_function_cache(@name).call(@args).to_s end |