Class: Rubycop::Analyzer::Ruby::Program

Inherits:
Statements show all
Defined in:
lib/rubycop/analyzer/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.



23
24
25
26
27
# File 'lib/rubycop/analyzer/ruby/statements.rb', line 23

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

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



30
31
32
# File 'lib/rubycop/analyzer/ruby/statements.rb', line 30

def filename
  @filename
end

#srcObject (readonly)

Returns the value of attribute src.



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

def src
  @src
end