Class: Yoda::AST::DefSingletonNode
- Defined in:
- lib/yoda/ast/def_singleton_node.rb
Instance Attribute Summary
Attributes inherited from Node
Attributes inherited from Vnode
Instance Method Summary collapse
- #body ⇒ Vnode
- #method? ⇒ Boolean
- #name_clause ⇒ NameVnode
- #parameters ⇒ ParametersNode
- #receiver ⇒ Vnode
Methods inherited from Node
#children, #identifier, #initialize, #kind, #source_map
Methods inherited from Vnode
#children, #constant?, #empty?, #identifier, #initialize, #inspect, #inspect_content, #nesting, #present?, #try, #type, #wrap_child
Methods included from Vnode::CommentPositional
#comments_by_vnode, #positionally_nearest_comment, #positionally_nearest_commenting_node
Methods included from Vnode::Positional
#location, #positionally_include?, #positionally_nearest_child, #range, #source_map
Methods included from Vnode::CommentAssociation
#all_nodes_lazy, #associate_comments, #comments, #wrapping?
Methods included from Traversable
#query, #query_all, #query_ancestor, #query_ancestors
Methods included from MethodTraversable
#calc_current_location_method, #including_method
Methods included from NamespaceTraversable
#calc_current_location_namespace, #full_name, #namespace, #namespace?, #namespace_path, #root?
Constructor Details
This class inherits a constructor from Yoda::AST::Node
Instance Method Details
#body ⇒ Vnode
23 24 25 |
# File 'lib/yoda/ast/def_singleton_node.rb', line 23 def body children[3] end |
#method? ⇒ Boolean
27 28 29 |
# File 'lib/yoda/ast/def_singleton_node.rb', line 27 def method? true end |
#name_clause ⇒ NameVnode
5 |
# File 'lib/yoda/ast/def_singleton_node.rb', line 5 delegate name: :name_clause |
#parameters ⇒ ParametersNode
18 19 20 |
# File 'lib/yoda/ast/def_singleton_node.rb', line 18 def parameters children[2] end |
#receiver ⇒ Vnode
8 9 10 |
# File 'lib/yoda/ast/def_singleton_node.rb', line 8 def receiver children[0] end |