Class: Rubycop::Analyzer::Ruby::ChainedBlock
- Defined in:
- lib/rubycop/analyzer/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.
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
#blocks ⇒ Object (readonly)
Returns the value of attribute blocks.
19 20 21 |
# File 'lib/rubycop/analyzer/ruby/blocks.rb', line 19 def blocks @blocks end |