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.
1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 |
# File 'lib/ruby-macrodroid/actions.rb', line 1702 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
1728 1729 1730 1731 |
# File 'lib/ruby-macrodroid/actions.rb', line 1728 def to_s(colour: false, indent: 0) @s = 'Share Location' + "\n" + @h[:variable][:name] # + @h.inspect super() end |