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.



141
142
143
# File 'lib/cql_ruby/executor.rb', line 141

def initialize(*args)
  super
end

Instance Attribute Details

#fileObject

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



140
141
142
# File 'lib/cql_ruby/executor.rb', line 140

def file
  @file
end

Instance Method Details

#source_line(n) ⇒ Object



145
146
147
148
149
# File 'lib/cql_ruby/executor.rb', line 145

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

  lines[n - 1].chop
end