Class: AdManagerApi::PQLQuery

Inherits:
Object
  • Object
show all
Defined in:
lib/ad_manager_api/pql_statement_utils.rb

Overview

Query class used by StatementBuilder.

Instance Method Summary collapse

Constructor Details

#initialize(query = nil) ⇒ PQLQuery

Create a new query.



27
28
29
# File 'lib/ad_manager_api/pql_statement_utils.rb', line 27

def initialize(query = nil)
  @query = (query.nil?) ? nil : query.dup()
end

Instance Method Details

#<<(clause) ⇒ Object

Concatenate a new clause onto the current query.



32
33
34
# File 'lib/ad_manager_api/pql_statement_utils.rb', line 32

def <<(clause)
  @query = (@query.nil?) ? clause : @query << ' ' << clause
end

#to_sObject

Return the query string for a PQLQuery



37
38
39
# File 'lib/ad_manager_api/pql_statement_utils.rb', line 37

def to_s()
  @query.dup()
end