Class: IncomingSMSTrigger

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

Overview

Category: Call/SMS

Instance Attribute Summary

Attributes inherited from Trigger

#constraints

Attributes inherited from MacroObject

#options, #siguid, #type

Instance Method Summary collapse

Methods inherited from Trigger

#match?

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ IncomingSMSTrigger

Returns a new instance of IncomingSMSTrigger.



1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
# File 'lib/ruby-macrodroid.rb', line 1596

def initialize(h={})

  options = {
    sms_from_list: [{:m_id=>"-2", :m_lookupKey=>"-2", :m_name=>"[Any Number]"}],
    group_id_list: [],
    group_name_list: [],
    sms_content: '',
    option: 0,
    excludes: false,
    exact_match: false,
    enable_regex: false,
    sms_number_exclude: false
  }

  super(options.merge h)

end

Instance Method Details

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



1614
1615
1616
# File 'lib/ruby-macrodroid.rb', line 1614

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