Class: WifiSSIDTrigger

Inherits:
Trigger show all
Defined in:
lib/ruby-macrodroid.rb

Overview

Category: Connectivity

Also known as Wifi SSID Transition

options:

in_range: true | false
wifi_cell_info: {display_name: "some Wifi SSID", 
                 ssid: "some Wifi SSID"} - 1 or more allowed

Instance Attribute Summary

Attributes inherited from Trigger

#constraints

Attributes inherited from MacroObject

#options, #siguid, #type

Instance Method Summary collapse

Methods inherited from Trigger

#match?

Constructor Details

#initialize(h = {}) ⇒ WifiSSIDTrigger

Returns a new instance of WifiSSIDTrigger.



1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
# File 'lib/ruby-macrodroid.rb', line 1761

def initialize(h={})

  options = {
    wifi_cell_info_list: [{:display_name=>"", :ssid=>""}],
    ssid_list: [],
    in_range: true
  }

  super(options.merge h)

end

Instance Method Details

#to_hObject



1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
# File 'lib/ruby-macrodroid.rb', line 1773

def to_h()
  
  h = super()
  val = h[:m_inRange]
  
  h[:m_InRange] = val
  h.delete :m_inRange
  
  return h
  
end

#to_s(colour: false) ⇒ Object Also known as: to_summary



1785
1786
1787
# File 'lib/ruby-macrodroid.rb', line 1785

def to_s(colour: false)
  'WifiSSIDTrigger ' + @h.inspect
end