Class: ParamsReady::Pagination::CursorBuilder::Literal

Inherits:
Object
  • Object
show all
Defined in:
lib/params_ready/pagination/cursor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, value, pk) ⇒ Literal

Returns a new instance of Literal.



54
55
56
57
58
59
# File 'lib/params_ready/pagination/cursor.rb', line 54

def initialize(key, value, pk)
  @key = key
  @value = Arel::Nodes::Quoted.new(value)
  @pk = pk
  freeze
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



51
52
53
# File 'lib/params_ready/pagination/cursor.rb', line 51

def key
  @key
end

#pkObject (readonly)

Returns the value of attribute pk.



52
53
54
# File 'lib/params_ready/pagination/cursor.rb', line 52

def pk
  @pk
end

Instance Method Details

#quotedObject



61
62
63
# File 'lib/params_ready/pagination/cursor.rb', line 61

def quoted
  @value
end

#rvalue(_) ⇒ Object



69
70
71
# File 'lib/params_ready/pagination/cursor.rb', line 69

def rvalue(_)
  @value
end

#valueObject



65
66
67
# File 'lib/params_ready/pagination/cursor.rb', line 65

def value
  @value.value
end