Class: ProjectSimulator::WebhookAction
- Inherits:
-
Object
- Object
- ProjectSimulator::WebhookAction
- Defined in:
- lib/projectsimulator.rb
Instance Attribute Summary collapse
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(namex, name: namex, url: '127.0.0.1') ⇒ WebhookAction
constructor
A new instance of WebhookAction.
- #to_node ⇒ Object
- #to_rowx ⇒ Object
Constructor Details
#initialize(namex, name: namex, url: '127.0.0.1') ⇒ WebhookAction
Returns a new instance of WebhookAction.
411 412 413 414 |
# File 'lib/projectsimulator.rb', line 411 def initialize(namex, name: namex, url: '127.0.0.1') @name = name @url = url end |
Instance Attribute Details
#url ⇒ Object
Returns the value of attribute url.
409 410 411 |
# File 'lib/projectsimulator.rb', line 409 def url @url end |
Instance Method Details
#call ⇒ Object
416 417 418 |
# File 'lib/projectsimulator.rb', line 416 def call() "webhook: %s" % @url end |
#to_node ⇒ Object
420 421 422 423 |
# File 'lib/projectsimulator.rb', line 420 def to_node() Rexle::Element.new(:action, \ attributes: {type: :webhook, name: @name, url: @url}) end |
#to_rowx ⇒ Object
425 426 427 428 |
# File 'lib/projectsimulator.rb', line 425 def to_rowx() s = "action: webhook %s" % @name s += "\n url: %s" % @url end |