Module: AWSCDK::Triggers::ITrigger
- Includes:
- Constructs::IConstruct
- Included in:
- Trigger, TriggerFunction
- Defined in:
- triggers/i_trigger.rb
Overview
Interface for triggers.
Class Method Summary collapse
Instance Method Summary collapse
-
#execute_after(*scopes) ⇒ void
Adds trigger dependencies.
-
#execute_before(*scopes) ⇒ void
Adds this trigger as a dependency on other constructs.
-
#node ⇒ Constructs::Node
The tree node.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Class Method Details
.jsii_overridable_methods ⇒ Object
57 58 59 60 61 62 63 64 |
# File 'triggers/i_trigger.rb', line 57 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :execute_after => { kind: :method, name: "executeAfter", is_optional: false }, :execute_before => { kind: :method, name: "executeBefore", is_optional: false }, } end |
Instance Method Details
#execute_after(*scopes) ⇒ void
This method returns an undefined value.
Adds trigger dependencies.
Execute this trigger only after these construct scopes have been provisioned.
36 37 38 39 40 41 |
# File 'triggers/i_trigger.rb', line 36 def execute_after(*scopes) scopes.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scopes[#{index}]") end jsii_call_method("executeAfter", [*scopes]) end |
#execute_before(*scopes) ⇒ void
This method returns an undefined value.
Adds this trigger as a dependency on other constructs.
This means that this trigger will get executed before the given construct(s).
50 51 52 53 54 55 |
# File 'triggers/i_trigger.rb', line 50 def execute_before(*scopes) scopes.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scopes[#{index}]") end jsii_call_method("executeBefore", [*scopes]) end |
#node ⇒ Constructs::Node
The tree node.
11 12 13 |
# File 'triggers/i_trigger.rb', line 11 def node() jsii_get_property("node") end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.
22 23 24 25 26 27 |
# File 'triggers/i_trigger.rb', line 22 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |