class AdwordsApi::QueryBuilder
Public Class Methods
new(api)
click to toggle source
# File lib/adwords_api/query_utils/query_builder.rb, line 24 def initialize(api) @api = api @where = [] end
Public Instance Methods
build_where()
click to toggle source
# File lib/adwords_api/query_utils/query_builder.rb, line 35 def build_where() return '' if @where.empty? wheres = @where.map {|w| w.awql} return sprintf(' WHERE %s', wheres.join(' AND ')) end
where(field)
click to toggle source
# File lib/adwords_api/query_utils/query_builder.rb, line 29 def where(field) clause = WhereBuilder.new(field) @where << clause return clause end