class CqlRuby::Crumb
Attributes
ancestors[R]
node[R]
source_reader[R]
Public Class Methods
new(node, ancestors, source_reader)
click to toggle source
# File lib/cql_ruby/executor.rb, line 128 def initialize(node, ancestors, source_reader) @node = node @ancestors = ancestors @source_reader = source_reader end
Public Instance Methods
expression_size()
click to toggle source
# File lib/cql_ruby/executor.rb, line 154 def expression_size anchor.location.expression.size end
file_name()
click to toggle source
# File lib/cql_ruby/executor.rb, line 150 def file_name source_reader.file end
line_col_no()
click to toggle source
# File lib/cql_ruby/executor.rb, line 138 def line_col_no anchor.location.expression.column end
line_no()
click to toggle source
# File lib/cql_ruby/executor.rb, line 134 def line_no anchor.location.expression.line end
source()
click to toggle source
# File lib/cql_ruby/executor.rb, line 142 def source source_reader.source_line(line_no) end
surrounding_line(offset)
click to toggle source
# File lib/cql_ruby/executor.rb, line 146 def surrounding_line(offset) source_reader.source_line(line_no + offset) end
type()
click to toggle source
# File lib/cql_ruby/executor.rb, line 158 def type anchor.type end
Private Instance Methods
anchor()
click to toggle source
# File lib/cql_ruby/executor.rb, line 164 def anchor if node.is_a?(Parser::AST::Node) node else ancestors.last end end