Class: M2X::MQTT::Resource
- Inherits:
-
Object
- Object
- M2X::MQTT::Resource
- Extended by:
- Forwardable
- Defined in:
- lib/m2x/mqtt/resource.rb
Overview
Wrapper for M2X::Client resources
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(client, attributes) ⇒ Resource
constructor
A new instance of Resource.
- #inspect ⇒ Object
- #path ⇒ Object
Constructor Details
#initialize(client, attributes) ⇒ Resource
Returns a new instance of Resource.
12 13 14 15 |
# File 'lib/m2x/mqtt/resource.rb', line 12 def initialize(client, attributes) @client = client @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
8 9 10 |
# File 'lib/m2x/mqtt/resource.rb', line 8 def attributes @attributes end |
Instance Method Details
#inspect ⇒ Object
17 18 19 |
# File 'lib/m2x/mqtt/resource.rb', line 17 def inspect "<#{self.class.name}: #{attributes.inspect}>" end |
#path ⇒ Object
21 22 23 |
# File 'lib/m2x/mqtt/resource.rb', line 21 def path raise NotImplementedError end |