Class: Zaid::Nodes::MethodNode
- Inherits:
-
Struct
- Object
- Struct
- Zaid::Nodes::MethodNode
- Defined in:
- lib/zaid/nodes/method_node.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#name ⇒ Object
Returns the value of attribute name.
-
#params ⇒ Object
Returns the value of attribute params.
Instance Method Summary collapse
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body
5 6 7 |
# File 'lib/zaid/nodes/method_node.rb', line 5 def body @body end |
#name ⇒ Object
Returns the value of attribute name
5 6 7 |
# File 'lib/zaid/nodes/method_node.rb', line 5 def name @name end |
#params ⇒ Object
Returns the value of attribute params
5 6 7 |
# File 'lib/zaid/nodes/method_node.rb', line 5 def params @params end |
Instance Method Details
#eval(context) ⇒ Object
6 7 8 |
# File 'lib/zaid/nodes/method_node.rb', line 6 def eval(context) context.current_class.runtime_methods[name] = Runtime::ZaidMethod.new(params, body) end |