Class: 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_range, #file, #full_source, #group, #line_range, #parent, #source, #source_range, #type
Printing a Node collapse
Methods inherited from AstNode
#inspect, #pretty_print, #show
Methods inherited from AstNode
#call?, #children, #first_line, #has_line?, #initialize, #jump, #kw?, #line, #literal?, node_class_for, #ref?, #to_s, #token?, #traverse
Methods inherited from Array
Constructor Details
This class inherits a constructor from YARD::Parser::Ruby::AstNode
Instance Method Details
#condition ⇒ Object
365 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 365 def condition; first end |
#condition? ⇒ Boolean
364 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 364 def condition?; true end |
#else_block ⇒ Object
368 369 370 371 372 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 368 def else_block if self[2] && !cmod? self[2].type == :elsif ? self[2] : self[2][0] end end |
#then_block ⇒ Object
366 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 366 def then_block; self[1] end |