Class: Nydp::Closure
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
-
#ifn ⇒ Object
Returns the value of attribute ifn.
Instance Method Summary collapse
-
#initialize(ifn, context) ⇒ Closure
constructor
A new instance of Closure.
- #inspect ⇒ Object
- #invoke(vm, arg_values) ⇒ Object
- #invoke_1(vm) ⇒ Object
- #invoke_2(vm, arg) ⇒ Object
- #invoke_3(vm, arg_0, arg_1) ⇒ Object
- #invoke_4(vm, arg_0, arg_1, arg_2) ⇒ Object
- #nydp_type ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(ifn, context) ⇒ Closure
Returns a new instance of Closure.
5 6 7 |
# File 'lib/nydp/closure.rb', line 5 def initialize ifn, context @ifn, @context = ifn, context end |
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
3 4 5 |
# File 'lib/nydp/closure.rb', line 3 def context @context end |
#ifn ⇒ Object
Returns the value of attribute ifn.
3 4 5 |
# File 'lib/nydp/closure.rb', line 3 def ifn @ifn end |
Instance Method Details
#inspect ⇒ Object
33 |
# File 'lib/nydp/closure.rb', line 33 def inspect ; to_s ; end |
#invoke(vm, arg_values) ⇒ Object
25 26 27 |
# File 'lib/nydp/closure.rb', line 25 def invoke vm, arg_values ifn.invoke vm, context, arg_values end |
#invoke_1(vm) ⇒ Object
9 10 11 |
# File 'lib/nydp/closure.rb', line 9 def invoke_1 vm ifn.invoke_1 vm, context end |
#invoke_2(vm, arg) ⇒ Object
13 14 15 |
# File 'lib/nydp/closure.rb', line 13 def invoke_2 vm, arg ifn.invoke_2 vm, context, arg end |
#invoke_3(vm, arg_0, arg_1) ⇒ Object
17 18 19 |
# File 'lib/nydp/closure.rb', line 17 def invoke_3 vm, arg_0, arg_1 ifn.invoke_3 vm, context, arg_0, arg_1 end |
#invoke_4(vm, arg_0, arg_1, arg_2) ⇒ Object
21 22 23 |
# File 'lib/nydp/closure.rb', line 21 def invoke_4 vm, arg_0, arg_1, arg_2 ifn.invoke_4 vm, context, arg_0, arg_1, arg_2 end |
#nydp_type ⇒ Object
29 |
# File 'lib/nydp/closure.rb', line 29 def nydp_type ; "fn" ; end |
#to_s ⇒ Object
30 31 32 |
# File 'lib/nydp/closure.rb', line 30 def to_s "(closure #{context.to_s} : #{ifn.to_s})" end |