Class: SyntaxTree::ERB::HtmlComment
- Defined in:
- lib/syntax_tree/erb/nodes.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #child_nodes ⇒ Object (also: #deconstruct)
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(token:, location:) ⇒ HtmlComment
constructor
A new instance of HtmlComment.
Methods inherited from Node
Constructor Details
#initialize(token:, location:) ⇒ HtmlComment
Returns a new instance of HtmlComment.
448 449 450 451 |
# File 'lib/syntax_tree/erb/nodes.rb', line 448 def initialize(token:, location:) @token = token @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
446 447 448 |
# File 'lib/syntax_tree/erb/nodes.rb', line 446 def location @location end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
446 447 448 |
# File 'lib/syntax_tree/erb/nodes.rb', line 446 def token @token end |
Instance Method Details
#accept(visitor) ⇒ Object
453 454 455 |
# File 'lib/syntax_tree/erb/nodes.rb', line 453 def accept(visitor) visitor.visit_html_comment(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
457 458 459 |
# File 'lib/syntax_tree/erb/nodes.rb', line 457 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
463 464 465 |
# File 'lib/syntax_tree/erb/nodes.rb', line 463 def deconstruct_keys(keys) { token: token, location: location } end |