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.
675 676 677 678 |
# File 'lib/syntax_tree/erb/nodes.rb', line 675 def initialize(location:, count:) @location = location @count = count end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
673 674 675 |
# File 'lib/syntax_tree/erb/nodes.rb', line 673 def count @count end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
673 674 675 |
# File 'lib/syntax_tree/erb/nodes.rb', line 673 def location @location end |
Instance Method Details
#accept(visitor) ⇒ Object
680 681 682 |
# File 'lib/syntax_tree/erb/nodes.rb', line 680 def accept(visitor) visitor.visit_new_line(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
684 685 686 |
# File 'lib/syntax_tree/erb/nodes.rb', line 684 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
690 691 692 |
# File 'lib/syntax_tree/erb/nodes.rb', line 690 def deconstruct_keys(keys) { location: location, count: count } end |