class Gracenote::Request::Option

Constants

DEFAULT_OPTIONS

Public Class Methods

new(xml, options = {}) click to toggle source
# File lib/gracenote/request/option.rb, line 28
def initialize(xml, options = {})
  @xml = xml

  @options = DEFAULT_OPTIONS.merge(options)
end

Public Instance Methods

render() click to toggle source
# File lib/gracenote/request/option.rb, line 34
def render
  @options.each { |k, v| render_option(k, v) }
end
render_option(key, value) click to toggle source
# File lib/gracenote/request/option.rb, line 38
def render_option(key, value)
  @xml.OPTION {
    @xml.PARAMETER key
    @xml.VALUE wrap_array(value).join(",")
  }
end