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
Constants inherited from AstNode
Instance Attribute Summary
Attributes inherited from AstNode
docstring, docstring_hash_flag, docstring_range, file, full_source, group, line_range, parent, source, source_range, type
Instance Method Summary (collapse)
Methods inherited from KeywordNode
Methods inherited from AstNode
#call?, #children, #first_line, #has_line?, #initialize, #inspect, #jump, #kw?, #line, #literal?, node_class_for, #pretty_print, #ref?, #show, #to_s, #token?, #traverse
Methods inherited from Array
Constructor Details
This class inherits a constructor from YARD::Parser::Ruby::AstNode
Instance Method Details
- (Object) condition
384 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 384 def condition; first end |
- (Boolean) condition?
383 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 383 def condition?; true end |
- (Object) else_block
387 388 389 390 391 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 387 def else_block if self[2] && !cmod? self[2].type == :elsif ? self[2] : self[2][0] end end |
- (Object) then_block
385 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 385 def then_block; self[1] end |