Class: Activecube::Query::LimitBy
- Inherits:
-
Object
- Object
- Activecube::Query::LimitBy
- Defined in:
- lib/activecube/query/limit_by.rb
Instance Attribute Summary collapse
-
#each ⇒ Object
readonly
Returns the value of attribute each.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
Instance Method Summary collapse
- #append_query(_model, _cube_query, _table, query) ⇒ Object
-
#initialize(arguments) ⇒ LimitBy
constructor
A new instance of LimitBy.
Constructor Details
#initialize(arguments) ⇒ LimitBy
Returns a new instance of LimitBy.
6 7 8 9 10 11 |
# File 'lib/activecube/query/limit_by.rb', line 6 def initialize arguments map = Hash[arguments] @each = map[:each] @limit = map[:limit] @offset = map[:offset] || 0 end |
Instance Attribute Details
#each ⇒ Object (readonly)
Returns the value of attribute each.
5 6 7 |
# File 'lib/activecube/query/limit_by.rb', line 5 def each @each end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
5 6 7 |
# File 'lib/activecube/query/limit_by.rb', line 5 def limit @limit end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
5 6 7 |
# File 'lib/activecube/query/limit_by.rb', line 5 def offset @offset end |
Instance Method Details
#append_query(_model, _cube_query, _table, query) ⇒ Object
13 14 15 |
# File 'lib/activecube/query/limit_by.rb', line 13 def append_query _model, _cube_query, _table, query query.limit_by each, limit, offset end |