Class: DissociatedIntrospection::Lambda

Inherits:
Object
  • Object
show all
Defined in:
lib/dissociated_introspection/method_call.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#astObject (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

#argumentsObject



17
18
19
# File 'lib/dissociated_introspection/method_call.rb', line 17

def arguments
  RubyCode.build_from_ast(ast.to_a[1])
end

#bodyObject



13
14
15
# File 'lib/dissociated_introspection/method_call.rb', line 13

def body
  RubyCode.build_from_ast(ast.to_a[2])
end

#typeObject



9
10
11
# File 'lib/dissociated_introspection/method_call.rb', line 9

def type
  ast.type
end