class IncomingCallTrigger

Category: Call/SMS

Public Class Methods

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

  options = {
    incoming_call_from_list: [{:m_id=>"-2", :m_lookupKey=>"-2", :m_name=>"[Any Number]"}],
    group_id_list: [],
    group_name_list: [],
    option: 0,
    phone_number_exclude: false
  }

  super(options.merge h)

end

Public Instance Methods

to_s(colour: false) click to toggle source
# File lib/ruby-macrodroid/triggers.rb, line 312
def to_s(colour: false)
  caller = @h[:incoming_call_from_list].map {|x| "%s" % x[:name]}.join(', ')
  "Call Incoming [%s]" % caller
end
Also aliased as: to_summary
to_summary(colour: false)
Alias for: to_s