Class: Sem4r::KeywordMatchTypeSearchParameter

Inherits:
Object
  • Object
show all
Includes:
Sem4rSoap::SoapAttributes
Defined in:
lib/sem4r/targeting_idea/targeting_idea_selector.rb

Instance Method Summary collapse

Methods included from Sem4rSoap::SoapAttributes

#_from_element, #_to_s, #_to_xml, included

Constructor Details

#initialize(&block) ⇒ KeywordMatchTypeSearchParameter

Returns a new instance of KeywordMatchTypeSearchParameter.



83
84
85
86
87
# File 'lib/sem4r/targeting_idea/targeting_idea_selector.rb', line 83

def initialize(&block)
  if block_given?
    block.arity < 1 ? instance_eval(&block) : block.call(self)
  end
end

Instance Method Details

#to_xmlObject



89
90
91
92
93
94
95
96
# File 'lib/sem4r/targeting_idea/targeting_idea_selector.rb', line 89

def to_xml
  xml = ""
  xml << '<s:searchParameters xsi:type="s:KeywordMatchTypeSearchParameter">'
  match_types.each do |t|
    xml << "<s:keywordMatchTypes>#{t}</s:keywordMatchTypes>"
  end
  xml << '</s:searchParameters>'
end