Class: MQTT::Subscriptions::Subscription Abstract
- Inherits:
-
Object
- Object
- MQTT::Subscriptions::Subscription
- Defined in:
- lib/mqtt/subscription_classes.rb
Overview
This class is abstract.
Basis for custom MQTT::Subcription objects
Direct Known Subclasses
CallbackSubscription, ValueTrackerSubscription, WaitpointSubscription
Instance Attribute Summary collapse
-
#qos ⇒ Object
readonly
Returns the value of attribute qos.
-
#topic ⇒ Object
readonly
Returns the value of attribute topic.
-
#topic_split ⇒ Object
readonly
Returns the value of attribute topic_split.
Instance Method Summary collapse
-
#initialize(topic, _qos) ⇒ Subscription
constructor
A new instance of Subscription.
- #offer(topicList, data) ⇒ Object
Constructor Details
#initialize(topic, _qos) ⇒ Subscription
Returns a new instance of Subscription.
12 13 14 15 16 17 |
# File 'lib/mqtt/subscription_classes.rb', line 12 def initialize(topic, _qos) @topic = topic; @topic_split = SubHandler.get_topic_split(topic); @qos = 0; end |
Instance Attribute Details
#qos ⇒ Object (readonly)
Returns the value of attribute qos.
9 10 11 |
# File 'lib/mqtt/subscription_classes.rb', line 9 def qos @qos end |
#topic ⇒ Object (readonly)
Returns the value of attribute topic.
8 9 10 |
# File 'lib/mqtt/subscription_classes.rb', line 8 def topic @topic end |
#topic_split ⇒ Object (readonly)
Returns the value of attribute topic_split.
10 11 12 |
# File 'lib/mqtt/subscription_classes.rb', line 10 def topic_split @topic_split end |
Instance Method Details
#offer(topicList, data) ⇒ Object
19 |
# File 'lib/mqtt/subscription_classes.rb', line 19 def offer(topicList, data) end |