Class: CqlRuby::Crumb

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ancestorsObject

Returns the value of attribute ancestors

Returns:

  • (Object)

    the current value of ancestors



110
111
112
# File 'lib/cql_ruby/executor.rb', line 110

def ancestors
  @ancestors
end

#full_nameObject

Returns the value of attribute full_name

Returns:

  • (Object)

    the current value of full_name



110
111
112
# File 'lib/cql_ruby/executor.rb', line 110

def full_name
  @full_name
end

#source_readerObject

Returns the value of attribute source_reader

Returns:

  • (Object)

    the current value of source_reader



110
111
112
# File 'lib/cql_ruby/executor.rb', line 110

def source_reader
  @source_reader
end

Instance Method Details

#expression_sizeObject



131
132
133
# File 'lib/cql_ruby/executor.rb', line 131

def expression_size
  ancestors.last.location.expression.size
end

#file_nameObject



127
128
129
# File 'lib/cql_ruby/executor.rb', line 127

def file_name
  source_reader.file
end

#line_col_noObject



115
116
117
# File 'lib/cql_ruby/executor.rb', line 115

def line_col_no
  ancestors.last.location.expression.column
end

#line_noObject



111
112
113
# File 'lib/cql_ruby/executor.rb', line 111

def line_no
  ancestors.last.location.expression.line
end

#sourceObject



119
120
121
# File 'lib/cql_ruby/executor.rb', line 119

def source
  source_reader.source_line(line_no)
end

#surrounding_line(offset) ⇒ Object



123
124
125
# File 'lib/cql_ruby/executor.rb', line 123

def surrounding_line(offset)
  source_reader.source_line(line_no + offset)
end

#typeObject



135
136
137
# File 'lib/cql_ruby/executor.rb', line 135

def type
  ancestors.last.type
end