class Proxy::Omaha::OmahaProtocol::Response
Attributes
appid[R]
base_url[R]
host[R]
status[R]
Public Class Methods
new(options = {})
click to toggle source
# File lib/smart_proxy_omaha/omaha_protocol/response.rb, line 9 def initialize(options = {}) @appid = options.fetch(:appid) @base_url = options.fetch(:base_url) @host = URI.parse(base_url).host @status = options.fetch(:status, 'ok') end
Public Instance Methods
to_xml()
click to toggle source
# File lib/smart_proxy_omaha/omaha_protocol/response.rb, line 16 def to_xml xml.to_xml end
Protected Instance Methods
xml()
click to toggle source
# File lib/smart_proxy_omaha/omaha_protocol/response.rb, line 22 def xml @xml ||= Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml| xml.response(:protocol => '3.0', :server => host) do xml.daystart(:elapsed_seconds => 0) xml.app(:app_id => appid, :status => status) do xml_response(xml) end end end end