Class: Tapioca::RBI::Group

Inherits:
Tree show all
Extended by:
T::Sig
Defined in:
lib/tapioca/rbi/printer.rb,
lib/tapioca/rbi/rewriters/group_nodes.rb

Defined Under Namespace

Classes: Kind

Instance Attribute Summary collapse

Attributes inherited from Tree

#nodes

Attributes inherited from Node

#parent_tree

Instance Method Summary collapse

Methods inherited from Tree

#<<, #empty?, #group_nodes!, #nest_non_public_methods!, #nest_singleton_methods!, #oneline?, #sort_nodes!

Methods inherited from Node

#detach, #group_kind, #oneline?, #print, #string

Constructor Details

#initialize(kind) ⇒ Group

Returns a new instance of Group.



86
87
88
89
# File 'lib/tapioca/rbi/rewriters/group_nodes.rb', line 86

def initialize(kind)
  super()
  @kind = kind
end

Instance Attribute Details

#kindObject (readonly)

Returns the value of attribute kind.



83
84
85
# File 'lib/tapioca/rbi/rewriters/group_nodes.rb', line 83

def kind
  @kind
end

Instance Method Details

#accept_printer(v) ⇒ Object



387
388
389
390
# File 'lib/tapioca/rbi/printer.rb', line 387

def accept_printer(v)
  v.printn unless v.previous_node.nil?
  v.visit_all(nodes)
end