Class: RubyCop::Ruby::Program

Inherits:
Statements show all
Defined in:
lib/ruby_cop/ruby/statements.rb

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(src, filename, statements) ⇒ Program

Returns a new instance of Program.



22
23
24
25
26
# File 'lib/ruby_cop/ruby/statements.rb', line 22

def initialize(src, filename, statements)
  @src = src
  @filename = filename
  super(statements)
end

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



29
30
31
# File 'lib/ruby_cop/ruby/statements.rb', line 29

def filename
  @filename
end

#srcObject (readonly)

Returns the value of attribute src.



28
29
30
# File 'lib/ruby_cop/ruby/statements.rb', line 28

def src
  @src
end