Class: Rubycop::Analyzer::Ruby::Block

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

Direct Known Subclasses

ChainedBlock, Else, For, IfMod, While, WhileMod

Instance Attribute Summary collapse

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(statements, params = nil) ⇒ Block

Returns a new instance of Block.



5
6
7
8
# File 'lib/rubycop/analyzer/ruby/blocks.rb', line 5

def initialize(statements, params=nil)
  @params = params
  super(statements)
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



10
11
12
# File 'lib/rubycop/analyzer/ruby/blocks.rb', line 10

def params
  @params
end