Class: Believer::Limit
- Inherits:
-
Object
- Object
- Believer::Limit
- Defined in:
- lib/believer/limit.rb
Instance Attribute Summary collapse
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Instance Method Summary collapse
-
#initialize(l) ⇒ Limit
constructor
A new instance of Limit.
- #to_cql ⇒ Object
- #to_i ⇒ Object
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
#size ⇒ Object (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_cql ⇒ Object
10 11 12 |
# File 'lib/believer/limit.rb', line 10 def to_cql "LIMIT #{@size}" end |
#to_i ⇒ Object
14 15 16 |
# File 'lib/believer/limit.rb', line 14 def to_i @size end |