Class: DissociatedIntrospection::RubyClass::Def
- Inherits:
-
Object
- Object
- DissociatedIntrospection::RubyClass::Def
- Defined in:
- lib/dissociated_introspection/ruby_class.rb
Instance Method Summary collapse
- #arguments ⇒ Object
- #body ⇒ Object
-
#initialize(ast:) ⇒ Def
constructor
A new instance of Def.
- #name ⇒ Object
- #to_ruby_str ⇒ Object
Constructor Details
#initialize(ast:) ⇒ Def
Returns a new instance of Def.
52 53 54 |
# File 'lib/dissociated_introspection/ruby_class.rb', line 52 def initialize(ast:) @ast = ast end |
Instance Method Details
#arguments ⇒ Object
60 61 62 |
# File 'lib/dissociated_introspection/ruby_class.rb', line 60 def arguments Unparser.unparse(ast.children[1]) end |
#body ⇒ Object
64 65 66 |
# File 'lib/dissociated_introspection/ruby_class.rb', line 64 def body Unparser.unparse(ast.children[2]) end |
#name ⇒ Object
56 57 58 |
# File 'lib/dissociated_introspection/ruby_class.rb', line 56 def name ast.children[0] end |
#to_ruby_str ⇒ Object
68 69 70 |
# File 'lib/dissociated_introspection/ruby_class.rb', line 68 def to_ruby_str Unparser.unparse(ast) end |