Class: DissociatedIntrospection::Lambda
- Inherits:
-
Object
- Object
- DissociatedIntrospection::Lambda
- Defined in:
- lib/dissociated_introspection/method_call.rb
Instance Attribute Summary collapse
-
#ast ⇒ Object
readonly
Returns the value of attribute ast.
Instance Method Summary collapse
- #arguments ⇒ Object
- #body ⇒ Object
-
#initialize(ast) ⇒ Lambda
constructor
A new instance of Lambda.
- #type ⇒ Object
Constructor Details
#initialize(ast) ⇒ Lambda
Returns a new instance of Lambda.
5 6 7 |
# File 'lib/dissociated_introspection/method_call.rb', line 5 def initialize(ast) @ast = ast end |
Instance Attribute Details
#ast ⇒ Object (readonly)
Returns the value of attribute ast.
3 4 5 |
# File 'lib/dissociated_introspection/method_call.rb', line 3 def ast @ast end |
Instance Method Details
#arguments ⇒ Object
17 18 19 |
# File 'lib/dissociated_introspection/method_call.rb', line 17 def arguments RubyCode.build_from_ast(ast.to_a[1]) end |
#body ⇒ Object
13 14 15 |
# File 'lib/dissociated_introspection/method_call.rb', line 13 def body RubyCode.build_from_ast(ast.to_a[2]) end |
#type ⇒ Object
9 10 11 |
# File 'lib/dissociated_introspection/method_call.rb', line 9 def type ast.type end |