Class: Sonos::Endpoint::Upnp::Subscription

Inherits:
Object
  • Object
show all
Defined in:
lib/sonos/endpoint/upnp.rb

Overview

Simple class structure for describing an active subscription

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Subscription

Returns a new instance of Subscription.



66
67
68
69
70
# File 'lib/sonos/endpoint/upnp.rb', line 66

def initialize(hash)
  hash.each do |k, v|
    self.send("#{k}=", v) if respond_to?(k)
  end
end

Instance Attribute Details

#eventObject

Returns the value of attribute event.



64
65
66
# File 'lib/sonos/endpoint/upnp.rb', line 64

def event
  @event
end

#sidObject

Returns the value of attribute sid.



63
64
65
# File 'lib/sonos/endpoint/upnp.rb', line 63

def sid
  @sid
end

#timeoutObject

Returns the value of attribute timeout.



62
63
64
# File 'lib/sonos/endpoint/upnp.rb', line 62

def timeout
  @timeout
end