class WeatherTrigger

Category: Location

Public Class Methods

new(h={}) click to toggle source
Calls superclass method Trigger::new
# File lib/ruby-macrodroid/triggers.rb, line 1264
def initialize(h={})

  options = {
    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(options.merge h)

end

Public Instance Methods

to_s(colour: false) click to toggle source
# File lib/ruby-macrodroid/triggers.rb, line 1283
def to_s(colour: false)
  'WeatherTrigger ' + @h.inspect
end
Also aliased as: to_summary
to_summary(colour: false)
Alias for: to_s