Class: Arel::Skip
- Defined in:
- lib/arel/algebra/relations/operations/skip.rb
Instance Attribute Summary collapse
-
#relation ⇒ Object
readonly
Returns the value of attribute relation.
-
#skipped ⇒ Object
readonly
Returns the value of attribute skipped.
Attributes inherited from Compound
Attributes included from Relation
Instance Method Summary collapse
- #eval ⇒ Object
-
#initialize(relation, skipped) ⇒ Skip
constructor
A new instance of Skip.
Methods inherited from Compound
#attributes, #column_for, #externalizable?, #join?, #joins, #name, #sources, #table, #table_alias, #table_sql, #taken, #unoperated_rows
Methods included from Relation
#[], #alias, #attributes, #bind, #call, #christener, #compiler, #delete, #each, #exclusion_predicate_sql, #externalizable?, #externalize, #find_attribute_matching_name, #from, #from_clauses, #group_clauses, #groupings, #having_clauses, #havings, #inclusion_predicate_sql, #insert, #inserts, #join, #join?, #joins, #lock, #locked, #order_clauses, #orders, #outer_join, #position_of, #primary_key, #project, #projections, #select_clauses, #session, #skip, #sources, #take, #taken, #to_sql, #update, #where, #where_clauses, #wheres
Constructor Details
#initialize(relation, skipped) ⇒ Skip
Returns a new instance of Skip.
5 6 7 8 |
# File 'lib/arel/algebra/relations/operations/skip.rb', line 5 def initialize relation, skipped super(relation) @skipped = skipped end |
Instance Attribute Details
#relation ⇒ Object (readonly)
Returns the value of attribute relation.
3 4 5 |
# File 'lib/arel/algebra/relations/operations/skip.rb', line 3 def relation @relation end |
#skipped ⇒ Object (readonly)
Returns the value of attribute skipped.
3 4 5 |
# File 'lib/arel/algebra/relations/operations/skip.rb', line 3 def skipped @skipped end |
Instance Method Details
#eval ⇒ Object
10 11 12 |
# File 'lib/arel/algebra/relations/operations/skip.rb', line 10 def eval unoperated_rows[skipped..-1] end |