Class: Mashery::QueryBuilder::Page

Inherits:
Object
  • Object
show all
Defined in:
lib/mashery/query_builder.rb

Overview

By default the first page is returned. The PAGE clause allows additional pages to be returned. > SELECT * FROM members PAGE 5

Instance Method Summary collapse

Constructor Details

#initialize(page) ⇒ Page

Returns a new instance of Page.



160
161
162
# File 'lib/mashery/query_builder.rb', line 160

def initialize(page)
  @page = page
end

Instance Method Details

#to_sObject



164
165
166
167
168
169
170
# File 'lib/mashery/query_builder.rb', line 164

def to_s
  if @page.blank?
    ""
  else
    "PAGE #{@page}"
  end
end