Class: WhatDyaReturn::AST::UntilNode

Inherits:
RuboCop::AST::UntilNode
  • Object
show all
Defined in:
lib/what_dya_return/ast/node/until_node.rb

Overview

A node extension for ‘if` nodes.

Instance Method Summary collapse

Instance Method Details

#body_reachable?Boolean

Examples:


until true
  42 # unreachable
end

Returns:

  • (Boolean)


18
19
20
# File 'lib/what_dya_return/ast/node/until_node.rb', line 18

def body_reachable?
  condition.truthy_literal?.!
end