Class: AjLisp::PrimitiveNativeMethod
- Defined in:
- lib/ajlisp/dot_verb_atom.rb
Instance Attribute Summary collapse
-
#symbol ⇒ Object
readonly
Returns the value of attribute symbol.
Instance Method Summary collapse
- #apply(context, args) ⇒ Object
-
#initialize(symbol) ⇒ PrimitiveNativeMethod
constructor
A new instance of PrimitiveNativeMethod.
Methods inherited from Primitive
Constructor Details
#initialize(symbol) ⇒ PrimitiveNativeMethod
Returns a new instance of PrimitiveNativeMethod.
21 22 23 |
# File 'lib/ajlisp/dot_verb_atom.rb', line 21 def initialize(symbol) @symbol = symbol end |
Instance Attribute Details
#symbol ⇒ Object (readonly)
Returns the value of attribute symbol.
19 20 21 |
# File 'lib/ajlisp/dot_verb_atom.rb', line 19 def symbol @symbol end |
Instance Method Details
#apply(context, args) ⇒ Object
25 26 27 28 |
# File 'lib/ajlisp/dot_verb_atom.rb', line 25 def apply(context, args) target = args.shift target.send(@symbol, *args) end |