Class: Yoda::AST::EmptyVnode

Inherits:
Vnode
  • Object
show all
Defined in:
lib/yoda/ast/empty_vnode.rb

Instance Attribute Summary

Attributes inherited from Vnode

#comments_by_node, #parent

Instance Method Summary collapse

Methods inherited from Vnode

#constant?, #identifier, #inspect, #inspect_content, #nesting, #present?, #try, #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

#initialize(_el = nil, **kwargs) ⇒ EmptyVnode

Returns a new instance of EmptyVnode.



4
5
6
# File 'lib/yoda/ast/empty_vnode.rb', line 4

def initialize(_el = nil, **kwargs)
  super(**kwargs)
end

Instance Method Details

#childrenArray<Node>?

Returns:

  • (Array<Node>, nil)


14
15
16
# File 'lib/yoda/ast/empty_vnode.rb', line 14

def children
  []
end

#empty?boolean

Returns:

  • (boolean)


19
20
21
# File 'lib/yoda/ast/empty_vnode.rb', line 19

def empty?
  true
end

#typeSymbol

Returns:

  • (Symbol)


9
10
11
# File 'lib/yoda/ast/empty_vnode.rb', line 9

def type
  :empty
end