Class: IncomingSMSTrigger

Inherits:
Trigger show all
Defined in:
lib/ruby-macrodroid/triggers.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.



390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
# File 'lib/ruby-macrodroid/triggers.rb', line 390

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



408
409
410
# File 'lib/ruby-macrodroid/triggers.rb', line 408

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