Class: SyntaxTree::ERB::ErbClose

Inherits:
Element show all
Defined in:
lib/syntax_tree/erb/nodes.rb

Direct Known Subclasses

ErbDoClose

Instance Attribute Summary collapse

Attributes inherited from Element

#location, #new_line

Instance Method Summary collapse

Methods inherited from Element

#without_new_line

Methods inherited from Node

#format, #pretty_print, #skip?, #without_new_line

Constructor Details

#initialize(closing:, new_line:, location:) ⇒ ErbClose

Returns a new instance of ErbClose.



375
376
377
378
# File 'lib/syntax_tree/erb/nodes.rb', line 375

def initialize(closing:, new_line:, location:)
  super(new_line: new_line, location: location)
  @closing = closing
end

Instance Attribute Details

#closingObject (readonly)

Returns the value of attribute closing.



373
374
375
# File 'lib/syntax_tree/erb/nodes.rb', line 373

def closing
  @closing
end

Instance Method Details

#accept(visitor) ⇒ Object



380
381
382
# File 'lib/syntax_tree/erb/nodes.rb', line 380

def accept(visitor)
  visitor.visit_erb_close(self)
end

#child_nodesObject Also known as: deconstruct



384
385
386
# File 'lib/syntax_tree/erb/nodes.rb', line 384

def child_nodes
  []
end

#deconstruct_keys(keys) ⇒ Object



390
391
392
# File 'lib/syntax_tree/erb/nodes.rb', line 390

def deconstruct_keys(keys)
  super.merge(closing: closing)
end