Class: MEACControl::XML::AbstractRequest
- Inherits:
-
Object
- Object
- MEACControl::XML::AbstractRequest
- Defined in:
- lib/meac_control/xml/abstract_request.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#commands ⇒ Object
readonly
Returns the value of attribute commands.
-
#devices ⇒ Object
readonly
Returns the value of attribute devices.
Instance Method Summary collapse
-
#initialize(devices, commands) ⇒ AbstractRequest
constructor
A new instance of AbstractRequest.
Constructor Details
#initialize(devices, commands) ⇒ AbstractRequest
Returns a new instance of AbstractRequest.
9 10 11 12 13 14 15 |
# File 'lib/meac_control/xml/abstract_request.rb', line 9 def initialize(devices, commands) @devices = [devices].compact.flatten @commands = [commands].compact.flatten raise MEACControl::XML::Request::EmptyDeviceList if @devices.empty? raise MEACControl::XML::Request::EmptyCommandList if @commands.empty? end |
Instance Attribute Details
#commands ⇒ Object (readonly)
Returns the value of attribute commands.
7 8 9 |
# File 'lib/meac_control/xml/abstract_request.rb', line 7 def commands @commands end |
#devices ⇒ Object (readonly)
Returns the value of attribute devices.
7 8 9 |
# File 'lib/meac_control/xml/abstract_request.rb', line 7 def devices @devices end |