Class: Katalyst::Tables::Collection::Query::UntaggedLiteral

Inherits:
Object
  • Object
show all
Defined in:
app/models/concerns/katalyst/tables/collection/query/untagged_literal.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#queryObject

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

#valueObject

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

Returns:

  • (Boolean)


16
17
18
# File 'app/models/concerns/katalyst/tables/collection/query/untagged_literal.rb', line 16

def literal?
  true
end

#rangeObject



24
25
26
# File 'app/models/concerns/katalyst/tables/collection/query/untagged_literal.rb', line 24

def range
  @start..@end
end

#tagged?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'app/models/concerns/katalyst/tables/collection/query/untagged_literal.rb', line 20

def tagged?
  false
end

#to_strObject 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