Module: Wemote::XML
- Defined in:
- lib/wemote/xml.rb
Constant Summary collapse
- TEMPLATES =
{ get_binary_state: File.read(File.join(xml_path,'get_binary_state.xml')), set_binary_state: File.read(File.join(xml_path,'set_binary_state.xml')), get_insight_params: File.read(File.join(xml_path,'get_insight_params.xml')) }
Class Method Summary collapse
-
.get_binary_state ⇒ String
The required XML body for a Wemo binary state request.
- .get_insight_params ⇒ Object
-
.set_binary_state(state) ⇒ String
The required XML body for a Wemo binary state set request.
Class Method Details
.get_binary_state ⇒ String
Returns The required XML body for a Wemo binary state request.
12 13 14 |
# File 'lib/wemote/xml.rb', line 12 def get_binary_state TEMPLATES[:get_binary_state] end |
.get_insight_params ⇒ Object
22 23 24 |
# File 'lib/wemote/xml.rb', line 22 def get_insight_params TEMPLATES[:get_insight_params] end |
.set_binary_state(state) ⇒ String
Returns The required XML body for a Wemo binary state set request.
18 19 20 |
# File 'lib/wemote/xml.rb', line 18 def set_binary_state(state) TEMPLATES[:set_binary_state].gsub("{{1}}",state.to_s) end |