Class: SyntaxTree::ERB::NewLine
- Defined in:
- lib/syntax_tree/erb/nodes.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #child_nodes ⇒ Object (also: #deconstruct)
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(location:, count:) ⇒ NewLine
constructor
A new instance of NewLine.
Methods inherited from Node
#format, #pretty_print, #skip?, #without_new_line
Constructor Details
#initialize(location:, count:) ⇒ NewLine
Returns a new instance of NewLine.
645 646 647 648 |
# File 'lib/syntax_tree/erb/nodes.rb', line 645 def initialize(location:, count:) @location = location @count = count end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
643 644 645 |
# File 'lib/syntax_tree/erb/nodes.rb', line 643 def count @count end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
643 644 645 |
# File 'lib/syntax_tree/erb/nodes.rb', line 643 def location @location end |
Instance Method Details
#accept(visitor) ⇒ Object
650 651 652 |
# File 'lib/syntax_tree/erb/nodes.rb', line 650 def accept(visitor) visitor.visit_new_line(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
654 655 656 |
# File 'lib/syntax_tree/erb/nodes.rb', line 654 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
660 661 662 |
# File 'lib/syntax_tree/erb/nodes.rb', line 660 def deconstruct_keys(keys) { location: location, count: count } end |