Class: RubyCop::Ruby::Args

Inherits:
List show all
Defined in:
lib/ruby_cop/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::Ruby::List

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



4
5
6
# File 'lib/ruby_cop/ruby/args.rb', line 4

def block
  @block
end

Instance Method Details

#add_block(block) ⇒ Object



6
7
8
# File 'lib/ruby_cop/ruby/args.rb', line 6

def add_block(block)
  @block = block
end

#to_arrayObject



10
11
12
# File 'lib/ruby_cop/ruby/args.rb', line 10

def to_array
  Array.new(@elements)
end