class Reactor::Cm::XmlMarkup
Public Instance Methods
array_value_tag!(name, values, options = {})
click to toggle source
# File lib/reactor/cm/xml_markup.rb, line 65 def array_value_tag!(name, values, options = {}) tag!(name.to_s, options) do values.each do |value| tag!('listitem') do text!(value.to_s) end end end end
create_tag!(base_name) { |xml| ... }
click to toggle source
# File lib/reactor/cm/xml_markup.rb, line 21 def create_tag!(base_name) tag!("#{base_name}-create") do |xml| yield xml end end
delete_tag!(base_name)
click to toggle source
# File lib/reactor/cm/xml_markup.rb, line 27 def delete_tag!(base_name) tag!("#{base_name}-delete") end
get_key_tag!(base_name, key)
click to toggle source
# File lib/reactor/cm/xml_markup.rb, line 31 def get_key_tag!(base_name, key) get_tag!(base_name) do |xml| if key.kind_of?(::Array) key.each {|k| xml.tag!(k.to_s) } else xml.tag!(key.to_s) ; end end end
get_tag!(base_name) { |xml| ... }
click to toggle source
# File lib/reactor/cm/xml_markup.rb, line 40 def get_tag!(base_name) tag!("#{base_name}-get") do |xml| yield xml end end
hash_value_tag!(name, hash)
click to toggle source
# File lib/reactor/cm/xml_markup.rb, line 75 def hash_value_tag!(name, hash) hash.each do |value, attr_hash| tag!(name.to_s, attr_hash) do text!(value.to_s) end end end
set_key_tag!(base_name, key, value, options = {})
click to toggle source
# File lib/reactor/cm/xml_markup.rb, line 46 def set_key_tag!(base_name, key, value, options = {}) set_tag!(base_name) do value_tag!(key, value, options) end end
set_tag!(base_name) { |xml| ... }
click to toggle source
# File lib/reactor/cm/xml_markup.rb, line 52 def set_tag!(base_name) tag!("#{base_name}-set") do |xml| yield xml end end
value_tag!(key, value, options = {})
click to toggle source
# File lib/reactor/cm/xml_markup.rb, line 58 def value_tag!(key, value, options = {}) if value.kind_of? ::Array then array_value_tag!(key, value, options) elsif value.kind_of? ::Hash then hash_value_tag!(key, value) else tag!(key.to_s) { text!(value.to_s) } end end
where_key_tag!(base_name, key, value)
click to toggle source
# File lib/reactor/cm/xml_markup.rb, line 7 def where_key_tag!(base_name, key, value) where_tag!(base_name) do |xml| xml.tag!(key.to_s) do xml.text!(value.to_s) end end end
where_tag!(base_name) { |xml| ... }
click to toggle source
# File lib/reactor/cm/xml_markup.rb, line 15 def where_tag!(base_name) tag!("#{base_name}-where") do |xml| yield xml end end