Class: YARD::Parser::Ruby::ConditionalNode
- Inherits:
-
KeywordNode
- Object
- Array
- AstNode
- KeywordNode
- YARD::Parser::Ruby::ConditionalNode
- Defined in:
- lib/yard/parser/ruby/ast_node.rb
Constant Summary
Instance Attribute Summary collapse
-
#docstring ⇒ Object
(also: #comments)
inherited
from AstNode
Returns the value of attribute docstring.
-
#docstring_hash_flag ⇒ Object
(also: #comments_hash_flag)
inherited
from AstNode
Returns the value of attribute docstring_hash_flag.
-
#docstring_range ⇒ Object
(also: #comments_range)
inherited
from AstNode
Returns the value of attribute docstring_range.
-
#file ⇒ String
inherited
from AstNode
The filename the node was parsed from.
-
#full_source ⇒ String
inherited
from AstNode
The full source that the node was parsed from.
-
#group ⇒ Object
inherited
from AstNode
deprecated
Deprecated.
Groups are now defined by directives
-
#line_range ⇒ Range
inherited
from AstNode
The line range in AstNode#full_source represented by the node.
-
#parent ⇒ AstNode?
inherited
from AstNode
The node's parent or nil if it is a root node.
-
#source ⇒ String
inherited
from AstNode
The parse of AstNode#full_source that the node represents.
-
#source_range ⇒ Range
inherited
from AstNode
The character range in AstNode#full_source represented by the node.
-
#type ⇒ Symbol
inherited
from AstNode
The node's unique symbolic type.
Managing node state collapse
Constructor Details
This class inherits a constructor from YARD::Parser::Ruby::AstNode
Instance Attribute Details
#docstring ⇒ Object Also known as: comments Originally defined in class AstNode
Returns the value of attribute docstring
#docstring_hash_flag ⇒ Object Also known as: comments_hash_flag Originally defined in class AstNode
Returns the value of attribute docstring_hash_flag
#docstring_range ⇒ Object Also known as: comments_range Originally defined in class AstNode
Returns the value of attribute docstring_range
#full_source ⇒ String Originally defined in class AstNode
Returns the full source that the node was parsed from
#group ⇒ Object Originally defined in class AstNode
Groups are now defined by directives
#line_range ⇒ Range Originally defined in class AstNode
Returns the line range in #full_source represented by the node
#parent ⇒ AstNode? Originally defined in class AstNode
Returns the node's parent or nil if it is a root node.
#source ⇒ String Originally defined in class AstNode
Returns the parse of #full_source that the node represents
#source_range ⇒ Range Originally defined in class AstNode
Returns the character range in #full_source represented by the node
#type ⇒ Symbol Originally defined in class AstNode
Returns the node's unique symbolic type
Instance Method Details
#condition ⇒ Object
488 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 488 def condition; first end |
#condition? ⇒ Boolean
487 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 487 def condition?; true end |
#else_block ⇒ Object
491 492 493 494 495 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 491 def else_block if self[2] && !cmod? self[2].type == :elsif ? self[2] : self[2][0] end end |
#then_block ⇒ Object
489 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 489 def then_block; self[1] end |