module RuboCop::AST::ConditionalNode
def body
-
(Node, nil)
- the body of the node
Other tags:
- Note: - For `if` nodes, this is the truthy branch.
def body node_parts[1] end
def condition
-
(Node, nil)
- the condition of the node
def condition node_parts[0] end
def multiline_condition?
-
(Boolean)
- whether the condition is on more than one line
def multiline_condition? !single_line_condition? end
def single_line_condition?
-
(Boolean)
- whether the condition is on a single line
def single_line_condition? loc.keyword.line == condition.source_range.line end