Class: Sem4r::NgramGroupsSearchParameter
- Inherits:
-
Object
- Object
- Sem4r::NgramGroupsSearchParameter
- Includes:
- Sem4rSoap::SoapAttributes
- Defined in:
- lib/sem4r/targeting_idea/targeting_idea_selector.rb
Instance Method Summary collapse
-
#initialize(&block) ⇒ NgramGroupsSearchParameter
constructor
A new instance of NgramGroupsSearchParameter.
- #to_xml ⇒ Object
Methods included from Sem4rSoap::SoapAttributes
#_from_element, #_to_s, #_to_xml, included
Constructor Details
#initialize(&block) ⇒ NgramGroupsSearchParameter
Returns a new instance of NgramGroupsSearchParameter.
127 128 129 130 131 |
# File 'lib/sem4r/targeting_idea/targeting_idea_selector.rb', line 127 def initialize(&block) if block_given? block.arity < 1 ? instance_eval(&block) : block.call(self) end end |
Instance Method Details
#to_xml ⇒ Object
133 134 135 136 137 138 139 140 |
# File 'lib/sem4r/targeting_idea/targeting_idea_selector.rb', line 133 def to_xml xml = "" xml << '<s:searchParameters xsi:type="s:NgramGroupsSearchParameter">' ngrams.each do |t| xml << "<s:ngramGroups>#{t}</s:ngramGroups>" end xml << '</s:searchParameters>' end |