Class: Believer::Limit

Inherits:
Object
  • Object
show all
Defined in:
lib/believer/limit.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(l) ⇒ Limit

Returns a new instance of Limit.



6
7
8
# File 'lib/believer/limit.rb', line 6

def initialize(l)
  @size = l.to_i
end

Instance Attribute Details

#sizeObject (readonly)

Returns the value of attribute size.



4
5
6
# File 'lib/believer/limit.rb', line 4

def size
  @size
end

Instance Method Details

#to_cqlObject



10
11
12
# File 'lib/believer/limit.rb', line 10

def to_cql
  "LIMIT #{@size}"
end

#to_iObject



14
15
16
# File 'lib/believer/limit.rb', line 14

def to_i
  @size
end