# Class: YARD::Parser::Ruby::ConditionalNode

Inherits:
  KeywordNode
  - Object
  - Array
  - AstNode
  - KeywordNode
  - YARD::Parser::Ruby::ConditionalNode
  show all

Defined in:
  lib/yard/parser/ruby/ast_node.rb

## Managing node state collapse

- #condition ⇒ Object
- #condition? ⇒ Boolean
- #else_block ⇒ Object
- #then_block ⇒ Object

## Constructor Details

This class inherits a constructor from YARD::Parser::Ruby::AstNode

## Instance Method Details

### #condition ⇒ `Object`

    518

    # File 'lib/yard/parser/ruby/ast_node.rb', line 518

    def condition; first end

### #condition? ⇒ `Boolean`

Returns:

- (`Boolean`)

    517

    # File 'lib/yard/parser/ruby/ast_node.rb', line 517

    def condition?; true end

### #else_block ⇒ `Object`

    521
    522
    523
    524

    # File 'lib/yard/parser/ruby/ast_node.rb', line 521

    def else_block
      return unless self[2] && !cmod?
      self[2].type == :elsif ? self[2] : self[2][0]
    end

### #then_block ⇒ `Object`

    519

    # File 'lib/yard/parser/ruby/ast_node.rb', line 519

    def then_block; self[1] end