Class: Sonos::Endpoint::Upnp::Subscription
- Inherits:
-
Object
- Object
- Sonos::Endpoint::Upnp::Subscription
- Defined in:
- lib/sonos/endpoint/upnp.rb
Overview
Simple class structure for describing an active subscription
Instance Attribute Summary collapse
-
#event ⇒ Object
Returns the value of attribute event.
-
#sid ⇒ Object
Returns the value of attribute sid.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Subscription
constructor
A new instance of Subscription.
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
#event ⇒ Object
Returns the value of attribute event.
64 65 66 |
# File 'lib/sonos/endpoint/upnp.rb', line 64 def event @event end |
#sid ⇒ Object
Returns the value of attribute sid.
63 64 65 |
# File 'lib/sonos/endpoint/upnp.rb', line 63 def sid @sid end |
#timeout ⇒ Object
Returns the value of attribute timeout.
62 63 64 |
# File 'lib/sonos/endpoint/upnp.rb', line 62 def timeout @timeout end |