Class: Melbourne::AST::SplatWhen

Inherits:
Node
  • Object
show all
Defined in:
lib/melbourne/ast/control_flow.rb

Overview

A splat (+*something+) inside a condition of a when statement as in:

case a
  when *c then
    d
end

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph

Constructor Details

#initialize(line, condition) ⇒ SplatWhen



126
127
128
129
# File 'lib/melbourne/ast/control_flow.rb', line 126

def initialize(line, condition)
  @line = line
  @condition = condition
end

Instance Attribute Details

#conditionObject

The actual content of the plat



124
125
126
# File 'lib/melbourne/ast/control_flow.rb', line 124

def condition
  @condition
end