Class: CqlRuby::Crumb
- Inherits:
-
Object
- Object
- CqlRuby::Crumb
- Defined in:
- lib/cql_ruby/executor.rb
Instance Method Summary collapse
- #expression_size ⇒ Object
- #file_name ⇒ Object
-
#initialize(node, ancestors, source_reader) ⇒ Crumb
constructor
A new instance of Crumb.
- #line_col_no ⇒ Object
- #line_no ⇒ Object
- #source ⇒ Object
- #surrounding_line(offset) ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(node, ancestors, source_reader) ⇒ Crumb
Returns a new instance of Crumb.
128 129 130 131 132 |
# File 'lib/cql_ruby/executor.rb', line 128 def initialize(node, ancestors, source_reader) @node = node @ancestors = ancestors @source_reader = source_reader end |
Instance Method Details
#expression_size ⇒ Object
154 155 156 |
# File 'lib/cql_ruby/executor.rb', line 154 def expression_size anchor.location.expression.size end |
#file_name ⇒ Object
150 151 152 |
# File 'lib/cql_ruby/executor.rb', line 150 def file_name source_reader.file end |
#line_col_no ⇒ Object
138 139 140 |
# File 'lib/cql_ruby/executor.rb', line 138 def line_col_no anchor.location.expression.column end |
#line_no ⇒ Object
134 135 136 |
# File 'lib/cql_ruby/executor.rb', line 134 def line_no anchor.location.expression.line end |
#source ⇒ Object
142 143 144 |
# File 'lib/cql_ruby/executor.rb', line 142 def source source_reader.source_line(line_no) end |
#surrounding_line(offset) ⇒ Object
146 147 148 |
# File 'lib/cql_ruby/executor.rb', line 146 def surrounding_line(offset) source_reader.source_line(line_no + offset) end |
#type ⇒ Object
158 159 160 |
# File 'lib/cql_ruby/executor.rb', line 158 def type anchor.type end |