Class: Yoda::AST::ClassNode

Inherits:
Node show all
Includes:
Namespace
Defined in:
lib/yoda/ast/class_node.rb

Instance Attribute Summary

Attributes inherited from Node

#node

Attributes inherited from Vnode

#comments_by_node, #parent

Instance Method Summary collapse

Methods included from Namespace

#namespace, #namespace?, #namespace_nestings, #parent_namespace, #path, #root?

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, #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

#bodyVnode

Returns:



17
18
19
# File 'lib/yoda/ast/class_node.rb', line 17

def body
  children[2]
end

#receiverConstantNode

Returns:



7
8
9
# File 'lib/yoda/ast/class_node.rb', line 7

def receiver
  children[0]
end

#super_classVnode

Returns:



12
13
14
# File 'lib/yoda/ast/class_node.rb', line 12

def super_class
  children[1]
end