Class: YARD::Parser::Ruby::ConditionalNode
- Inherits:
-
AstNode
show all
- Defined in:
- lib/yard/parser/ruby/ast_node.rb
Constant Summary
Instance Attribute Summary
Attributes inherited from AstNode
#docstring, #docstring_range, #file, #full_source, #group, #line_range, #parent, #source, #source_range, #type
Instance Method Summary
(collapse)
Methods inherited from AstNode
#call?, #children, #first_line, #has_line?, #initialize, #inspect, #jump, #kw?, #line, #literal?, node_class_for, #pretty_print, #ref?, #show, #token?, #traverse
Methods inherited from Array
#place
Instance Method Details
- (Object) condition
369
|
# File 'lib/yard/parser/ruby/ast_node.rb', line 369
def condition; first end
|
- (Boolean) condition?
368
|
# File 'lib/yard/parser/ruby/ast_node.rb', line 368
def condition?; true end
|
- (Object) else_block
372
373
374
375
376
|
# File 'lib/yard/parser/ruby/ast_node.rb', line 372
def else_block
if self[2] && !cmod?
self[2].type == :elsif ? self[2] : self[2][0]
end
end
|
- (Object) then_block
370
|
# File 'lib/yard/parser/ruby/ast_node.rb', line 370
def then_block; self[1] end
|