Class: Sem4r::ExcludedKeywordSearchParameter

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) ⇒ ExcludedKeywordSearchParameter

Returns a new instance of ExcludedKeywordSearchParameter.



59
60
61
62
63
# File 'lib/sem4r/targeting_idea/targeting_idea_selector.rb', line 59

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

Instance Method Details

#to_xmlObject



65
66
67
68
69
70
71
72
73
74
75
# File 'lib/sem4r/targeting_idea/targeting_idea_selector.rb', line 65

def to_xml
  <<-EOS
      <s:searchParameters xsi:type="s:ExcludedKeywordSearchParameter">
        <s:keywords xsi:type="Keyword">
          <Criterion.Type>Keyword</Criterion.Type>
          <text>#{text}</text>
          <matchType>#{match_type}</matchType>
        </s:keywords>
      </s:searchParameters>
  EOS
end