Class: Rubycop::Analyzer::Ruby::Args

Inherits:
List
  • Object
show all
Defined in:
lib/rubycop/analyzer/ruby/args.rb

Instance Attribute Summary collapse

Attributes inherited from List

#elements

Instance Method Summary collapse

Methods inherited from List

#add, #initialize

Methods inherited from Node

#accept

Constructor Details

This class inherits a constructor from Rubycop::Analyzer::Ruby::List

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



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

def block
  @block
end

Instance Method Details

#add_block(block) ⇒ Object



7
8
9
# File 'lib/rubycop/analyzer/ruby/args.rb', line 7

def add_block(block)
  @block = block
end

#to_arrayObject



11
12
13
# File 'lib/rubycop/analyzer/ruby/args.rb', line 11

def to_array
  Array.new(@elements)
end