Class: Arel::Skip

Inherits:
Compound show all
Defined in:
lib/arel/algebra/relations/operations/skip.rb

Instance Attribute Summary collapse

Attributes inherited from Compound

#engine

Attributes included from Relation

#count

Instance Method Summary collapse

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

#relationObject (readonly)

Returns the value of attribute relation.



3
4
5
# File 'lib/arel/algebra/relations/operations/skip.rb', line 3

def relation
  @relation
end

#skippedObject (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

#evalObject



10
11
12
# File 'lib/arel/algebra/relations/operations/skip.rb', line 10

def eval
  unoperated_rows[skipped..-1]
end