Class: Katalyst::Tables::Collection::Query::UntaggedLiteral
- Inherits:
-
Object
- Object
- Katalyst::Tables::Collection::Query::UntaggedLiteral
- Defined in:
- app/models/concerns/katalyst/tables/collection/query/untagged_literal.rb
Instance Attribute Summary collapse
-
#query ⇒ Object
Returns the value of attribute query.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value:, start:) ⇒ UntaggedLiteral
constructor
A new instance of UntaggedLiteral.
- #literal? ⇒ Boolean
- #range ⇒ Object
- #tagged? ⇒ Boolean
- #to_str ⇒ Object (also: #to_s)
Constructor Details
#initialize(value:, start:) ⇒ UntaggedLiteral
Returns a new instance of UntaggedLiteral.
10 11 12 13 14 |
# File 'app/models/concerns/katalyst/tables/collection/query/untagged_literal.rb', line 10 def initialize(value:, start:) @value = value @start = start @end = start + value.length end |
Instance Attribute Details
#query ⇒ Object
Returns the value of attribute query.
8 9 10 |
# File 'app/models/concerns/katalyst/tables/collection/query/untagged_literal.rb', line 8 def query @query end |
#value ⇒ Object
Returns the value of attribute value.
8 9 10 |
# File 'app/models/concerns/katalyst/tables/collection/query/untagged_literal.rb', line 8 def value @value end |
Instance Method Details
#literal? ⇒ Boolean
16 17 18 |
# File 'app/models/concerns/katalyst/tables/collection/query/untagged_literal.rb', line 16 def literal? true end |
#range ⇒ Object
24 25 26 |
# File 'app/models/concerns/katalyst/tables/collection/query/untagged_literal.rb', line 24 def range @start..@end end |
#tagged? ⇒ Boolean
20 21 22 |
# File 'app/models/concerns/katalyst/tables/collection/query/untagged_literal.rb', line 20 def tagged? false end |
#to_str ⇒ Object Also known as: to_s
28 29 30 |
# File 'app/models/concerns/katalyst/tables/collection/query/untagged_literal.rb', line 28 def to_str @value end |