Class: Dhallish::BuiltinFunction
- Inherits:
-
Object
- Object
- Dhallish::BuiltinFunction
- Defined in:
- lib/types.rb
Overview
To be used as Dhallish::Value.val for ruby-defined functions
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
Instance Method Summary collapse
- #call(arg) ⇒ Object
-
#initialize(&block) ⇒ BuiltinFunction
constructor
A new instance of BuiltinFunction.
Constructor Details
#initialize(&block) ⇒ BuiltinFunction
Returns a new instance of BuiltinFunction.
361 362 363 |
# File 'lib/types.rb', line 361 def initialize(&block) @block = block end |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
360 361 362 |
# File 'lib/types.rb', line 360 def block @block end |
Instance Method Details
#call(arg) ⇒ Object
365 |
# File 'lib/types.rb', line 365 def call(arg) @block.call arg end |