Class: TextManipulationAction

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

Overview

MacroDroid Specific

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 = {}) ⇒ TextManipulationAction

Returns a new instance of TextManipulationAction.



1464
1465
1466
1467
1468
1469
1470
1471
# File 'lib/ruby-macrodroid/actions.rb', line 1464

def initialize(h={})
  
  options = {

  }
  super(h)
  
end

Instance Method Details

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



1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
# File 'lib/ruby-macrodroid/actions.rb', line 1473

def to_s(colour: false)
  
  tm = @h[:text_manipulation]
  
  s = case tm[:type].to_sym
  when :SubstringManipulation
    "Substring(%s, %s)" % [@h[:text], tm[:params].join(', ')]
  end

  
  'Text Manipulation' + "\n  " + s #+ ' ' + @h.inspect
  
  
end