Class: WebHookTrigger
- Inherits:
-
Trigger
- Object
- MacroObject
- Trigger
- WebHookTrigger
- Defined in:
- lib/ruby-macrodroid/triggers.rb
Overview
Category: Connectivity
Instance Attribute Summary
Attributes inherited from Trigger
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ WebHookTrigger
constructor
A new instance of WebHookTrigger.
- #to_s(colour: false) ⇒ Object (also: #to_summary)
Methods inherited from Trigger
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ WebHookTrigger
Returns a new instance of WebHookTrigger.
406 407 408 409 410 411 412 413 414 |
# File 'lib/ruby-macrodroid/triggers.rb', line 406 def initialize(h={}) = { identifier: '' } super(.merge h) end |
Instance Method Details
#to_s(colour: false) ⇒ Object Also known as: to_summary
416 417 418 419 420 421 422 423 |
# File 'lib/ruby-macrodroid/triggers.rb', line 416 def to_s(colour: false) url = "https://trigger.macrodroid.com/%s/%s" % \ [@h[:macro].deviceid, @h[:identifier]] @s = 'WebHook (Url)' + "\n " + url super() end |