Class: RubyCop::Ruby::ChainedBlock
- Defined in:
- lib/ruby_cop/ruby/blocks.rb
Instance Attribute Summary collapse
-
#blocks ⇒ Object
readonly
Returns the value of attribute blocks.
Attributes inherited from Block
Attributes inherited from List
Instance Method Summary collapse
-
#initialize(blocks, statements, params = nil) ⇒ ChainedBlock
constructor
A new instance of ChainedBlock.
Methods inherited from Statements
#to_block, #to_chained_block, #to_program
Methods inherited from List
Methods inherited from Node
Constructor Details
#initialize(blocks, statements, params = nil) ⇒ ChainedBlock
Returns a new instance of ChainedBlock.
13 14 15 16 |
# File 'lib/ruby_cop/ruby/blocks.rb', line 13 def initialize(blocks, statements, params=nil) @blocks = Array(blocks).compact super(statements, params) end |
Instance Attribute Details
#blocks ⇒ Object (readonly)
Returns the value of attribute blocks.
18 19 20 |
# File 'lib/ruby_cop/ruby/blocks.rb', line 18 def blocks @blocks end |