Class: LogAction

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

Overview

Category: Logging

Instance Attribute Summary

Attributes inherited from Action

#constraints

Attributes inherited from MacroObject

#options, #siguid, #type

Instance Method Summary collapse

Methods inherited from Action

#invoke

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ LogAction

Returns a new instance of LogAction.



1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
# File 'lib/ruby-macrodroid/actions.rb', line 1309

def initialize(h={})

  options = {
    log_text: '',
    log_date_and_time: true
  }

  super(options.merge h)

end

Instance Method Details

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



1320
1321
1322
# File 'lib/ruby-macrodroid/actions.rb', line 1320

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