Class: WeatherTrigger
- Inherits:
-
Trigger
- Object
- MacroObject
- Trigger
- WeatherTrigger
- Defined in:
- lib/ruby-macrodroid/triggers.rb
Overview
Category: Location
Instance Attribute Summary
Attributes inherited from Trigger
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ WeatherTrigger
constructor
A new instance of WeatherTrigger.
- #to_s(colour: false) ⇒ Object (also: #to_summary)
Methods inherited from Trigger
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ WeatherTrigger
Returns a new instance of WeatherTrigger.
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 |
# File 'lib/ruby-macrodroid/triggers.rb', line 1162 def initialize(h={}) = { humidity_above: true, humidity_value: 50, option: 4, temp_below: true, temp_celcius: true, temperature: 0, weather_condition: 0, wind_speed_above: true, wind_speed_value: 0, wind_speed_value_mph: 0 } super(.merge h) end |
Instance Method Details
#to_s(colour: false) ⇒ Object Also known as: to_summary
1181 1182 1183 |
# File 'lib/ruby-macrodroid/triggers.rb', line 1181 def to_s(colour: false) 'WeatherTrigger ' + @h.inspect end |