Class: TextManipulationAction
- Inherits:
-
Action
- Object
- MacroObject
- Action
- TextManipulationAction
- Defined in:
- lib/ruby-macrodroid/actions.rb
Overview
MacroDroid Specific
Instance Attribute Summary
Attributes inherited from Action
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ TextManipulationAction
constructor
A new instance of TextManipulationAction.
- #to_s(colour: false) ⇒ Object (also: #to_summary)
Methods inherited from Action
Methods inherited from MacroObject
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={}) = { } 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 |