Class: DfpApiStatement::FilterStatement
- Inherits:
-
Object
- Object
- DfpApiStatement::FilterStatement
- Defined in:
- lib/dfp_api_statement.rb
Overview
A statement object for PQL and get*ByStatement queries.
Instance Attribute Summary collapse
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#offset ⇒ Object
Returns the value of attribute offset.
Instance Method Summary collapse
-
#initialize(query_statement = '', values = [], limit = SUGGESTED_PAGE_LIMIT, offset = 0) ⇒ FilterStatement
constructor
Constructor for a Filter Statement.
- #toStatement ⇒ Object
Constructor Details
#initialize(query_statement = '', values = [], limit = SUGGESTED_PAGE_LIMIT, offset = 0) ⇒ FilterStatement
Constructor for a Filter Statement.
29 30 31 32 33 34 35 |
# File 'lib/dfp_api_statement.rb', line 29 def initialize(query_statement='', values=[], limit=SUGGESTED_PAGE_LIMIT, offset=0) @query_statement = query_statement @values = values @limit = limit @offset = offset end |
Instance Attribute Details
#limit ⇒ Object
Returns the value of attribute limit.
37 38 39 |
# File 'lib/dfp_api_statement.rb', line 37 def limit @limit end |
#offset ⇒ Object
Returns the value of attribute offset.
38 39 40 |
# File 'lib/dfp_api_statement.rb', line 38 def offset @offset end |
Instance Method Details
#toStatement ⇒ Object
40 41 42 43 |
# File 'lib/dfp_api_statement.rb', line 40 def toStatement() statement = @query_statement + ' LIMIT %d OFFSET %d' % [@limit, @offset] return {:query => statement, :values => @values} end |