Class: ShareLocationAction
- Inherits:
-
LocationAction
- Object
- MacroObject
- Action
- LocationAction
- ShareLocationAction
- Defined in:
- lib/ruby-macrodroid/actions.rb
Overview
Category: Location
Instance Attribute Summary
Attributes inherited from Action
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(obj = nil) ⇒ ShareLocationAction
constructor
A new instance of ShareLocationAction.
- #to_s(colour: false, indent: 0) ⇒ Object (also: #to_summary)
Methods inherited from Action
Methods included from ObjectX
#action_to_object, #object_create, #varify
Methods inherited from MacroObject
Constructor Details
#initialize(obj = nil) ⇒ ShareLocationAction
Returns a new instance of ShareLocationAction.
1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 |
# File 'lib/ruby-macrodroid/actions.rb', line 1463 def initialize(obj=nil) h = if obj.is_a? Hash then obj elsif obj.is_a? Array e, macro = obj {variable: macro.set_var(e.text('item/description').to_s)} end #super() = { email: '', variable: {:string_value=>"", :name=>"", :decimal_value=>0.0, :is_local=>true, :boolean_value=>false, :exclude_from_log=>false, :int_value=>0, :type=>2}, sim_id: 0, output_channel: 5, old_variable_format: true } #options[:variable].merge! h super(.merge h) end |
Instance Method Details
#to_s(colour: false, indent: 0) ⇒ Object Also known as: to_summary
1489 1490 1491 1492 |
# File 'lib/ruby-macrodroid/actions.rb', line 1489 def to_s(colour: false, indent: 0) @s = 'Share Location' + "\n" + @h[:variable][:name] # + @h.inspect super() end |