Class: CqlRuby::SourceReader

Inherits:
Struct
  • Object
show all
Defined in:
lib/cql_ruby/executor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ SourceReader

Returns a new instance of SourceReader.



179
180
181
# File 'lib/cql_ruby/executor.rb', line 179

def initialize(*args)
  super
end

Instance Attribute Details

#fileObject

Returns the value of attribute file

Returns:

  • the current value of file



178
179
180
# File 'lib/cql_ruby/executor.rb', line 178

def file
  @file
end

Instance Method Details

#source_line(n) ⇒ Object



183
184
185
186
187
# File 'lib/cql_ruby/executor.rb', line 183

def source_line(n)
  return nil unless lines.size >= n

  lines[n - 1].chop
end