Class: RubyCop::Ruby::Case

Inherits:
Node
  • Object
show all
Defined in:
lib/ruby_cop/ruby/case.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#accept

Constructor Details

#initialize(expression, block) ⇒ Case

Returns a new instance of Case.



4
5
6
7
# File 'lib/ruby_cop/ruby/case.rb', line 4

def initialize(expression, block)
  @expression = expression
  @block = block
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



10
11
12
# File 'lib/ruby_cop/ruby/case.rb', line 10

def block
  @block
end

#expressionObject (readonly)

Returns the value of attribute expression.



9
10
11
# File 'lib/ruby_cop/ruby/case.rb', line 9

def expression
  @expression
end