Class: WaitStep
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- WaitStep
- Defined in:
- lib/schema.rb
Overview
Waits for previous steps to pass before continuing
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 |
# File 'lib/schema.rb', line 2183 def self.from_dynamic!(d) d = Types::Hash[d] new( allow_dependency_failure: d["allow_dependency_failure"] ? AllowDependencyFailureUnion.from_dynamic!(d["allow_dependency_failure"]) : nil, branches: d["branches"] ? Branches.from_dynamic!(d["branches"]) : nil, continue_on_failure: d["continue_on_failure"] ? AllowDependencyFailureUnion.from_dynamic!(d["continue_on_failure"]) : nil, depends_on: d["depends_on"] ? DependsOn.from_dynamic!(d["depends_on"]) : nil, id: d["id"], identifier: d["identifier"], wait_step_if: d["if"], key: d["key"], label: d["label"], wait_step_name: d["name"], wait_step_type: d["type"], wait: d["wait"] ) end |
.from_json!(json) ⇒ Object
2201 2202 2203 |
# File 'lib/schema.rb', line 2201 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 |
# File 'lib/schema.rb', line 2205 def to_dynamic { "allow_dependency_failure" => allow_dependency_failure&.to_dynamic, "branches" => branches&.to_dynamic, "continue_on_failure" => continue_on_failure&.to_dynamic, "depends_on" => depends_on&.to_dynamic, "id" => id, "identifier" => identifier, "if" => wait_step_if, "key" => key, "label" => label, "name" => wait_step_name, "type" => wait_step_type, "wait" => wait } end |
#to_json(options = nil) ⇒ Object
2222 2223 2224 |
# File 'lib/schema.rb', line 2222 def to_json( = nil) JSON.generate(to_dynamic, ) end |