Class: Babik::QuerySet::Limit
- Inherits:
-
Object
- Object
- Babik::QuerySet::Limit
- Defined in:
- lib/babik/queryset/components/limit.rb
Overview
Manages the limit of the QuerySet
Instance Attribute Summary collapse
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Instance Method Summary collapse
-
#initialize(size, offset = 0) ⇒ Limit
constructor
Construct a limit for QuerySet.
Constructor Details
#initialize(size, offset = 0) ⇒ Limit
Construct a limit for QuerySet
13 14 15 16 |
# File 'lib/babik/queryset/components/limit.rb', line 13 def initialize(size, offset = 0) @size = size.to_i @offset = offset.to_i end |
Instance Attribute Details
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
8 9 10 |
# File 'lib/babik/queryset/components/limit.rb', line 8 def offset @offset end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
8 9 10 |
# File 'lib/babik/queryset/components/limit.rb', line 8 def size @size end |