Class: OpenWebPageAction

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

Overview

Category: Applications

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

Returns a new instance of OpenWebPageAction.



2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
# File 'lib/ruby-macrodroid.rb', line 2581

def initialize(h={})
  
  h[:url_to_open] = h[:url] if h[:url]

  options = {
    variable_to_save_response: {:m_stringValue=>"", :m_name=>"", :m_decimalValue=>0.0, :isLocal=>true, :m_booleanValue=>false, :excludeFromLog=>false, :m_intValue=>0, :m_type=>2},
    url_to_open: '',
    http_get: true,
    disable_url_encode: false,
    block_next_action: false
  }

  super(options.merge filter(options,h))

end

Instance Method Details

#to_sObject



2597
2598
2599
# File 'lib/ruby-macrodroid.rb', line 2597

def to_s()
  "HTTP GET\n  url: " + @h[:url_to_open]
end