Class: SyntaxTree::Retry
Overview
Retry represents the use of the retry keyword.
retry
Instance Attribute Summary collapse
-
#comments ⇒ Object
readonly
- Array[ Comment | EmbDoc ]
-
the comments attached to this node.
-
#value ⇒ Object
readonly
- String
-
the value of the keyword.
Attributes inherited from Node
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #child_nodes ⇒ Object (also: #deconstruct)
- #deconstruct_keys(keys) ⇒ Object
- #format(q) ⇒ Object
-
#initialize(value:, location:, comments: []) ⇒ Retry
constructor
A new instance of Retry.
Methods inherited from Node
Constructor Details
#initialize(value:, location:, comments: []) ⇒ Retry
Returns a new instance of Retry.
7083 7084 7085 7086 7087 |
# File 'lib/syntax_tree/node.rb', line 7083 def initialize(value:, location:, comments: []) @value = value @location = location @comments = comments end |
Instance Attribute Details
#comments ⇒ Object (readonly)
- Array[ Comment | EmbDoc ]
-
the comments attached to this node
7081 7082 7083 |
# File 'lib/syntax_tree/node.rb', line 7081 def comments @comments end |
#value ⇒ Object (readonly)
- String
-
the value of the keyword
7078 7079 7080 |
# File 'lib/syntax_tree/node.rb', line 7078 def value @value end |
Instance Method Details
#accept(visitor) ⇒ Object
7089 7090 7091 |
# File 'lib/syntax_tree/node.rb', line 7089 def accept(visitor) visitor.visit_retry(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
7093 7094 7095 |
# File 'lib/syntax_tree/node.rb', line 7093 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
7099 7100 7101 |
# File 'lib/syntax_tree/node.rb', line 7099 def deconstruct_keys(keys) { value: value, location: location, comments: comments } end |
#format(q) ⇒ Object
7103 7104 7105 |
# File 'lib/syntax_tree/node.rb', line 7103 def format(q) q.text(value) end |