Class: Rubycop::Analyzer::Ruby::ChainedBlock

Inherits:
Block show all
Defined in:
lib/rubycop/analyzer/ruby/blocks.rb

Direct Known Subclasses

If, When

Instance Attribute Summary collapse

Attributes inherited from Block

#params

Attributes inherited from List

#elements

Instance Method Summary collapse

Methods inherited from Statements

#to_block, #to_chained_block, #to_program

Methods inherited from List

#add

Methods inherited from Node

#accept

Constructor Details

#initialize(blocks, statements, params = nil) ⇒ ChainedBlock

Returns a new instance of ChainedBlock.



14
15
16
17
# File 'lib/rubycop/analyzer/ruby/blocks.rb', line 14

def initialize(blocks, statements, params=nil)
  @blocks = Array(blocks).compact
  super(statements, params)
end

Instance Attribute Details

#blocksObject (readonly)

Returns the value of attribute blocks.



19
20
21
# File 'lib/rubycop/analyzer/ruby/blocks.rb', line 19

def blocks
  @blocks
end