Class: AutomateSoup::Stage
- Inherits:
-
Object
- Object
- AutomateSoup::Stage
- Defined in:
- lib/automate_soup/stage.rb
Overview
Class to represent operations on a stage.
Instance Method Summary collapse
- #failed? ⇒ Boolean
-
#initialize(hash) ⇒ Stage
constructor
A new instance of Stage.
- #method_missing(method, *args, &block) ⇒ Object
- #passed? ⇒ Boolean
Constructor Details
#initialize(hash) ⇒ Stage
Returns a new instance of Stage
8 9 10 |
# File 'lib/automate_soup/stage.rb', line 8 def initialize(hash) @source = OpenStruct.new hash end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
12 13 14 |
# File 'lib/automate_soup/stage.rb', line 12 def method_missing(method, *args, &block) @source.send(method, *args, &block) end |
Instance Method Details
#failed? ⇒ Boolean
20 21 22 |
# File 'lib/automate_soup/stage.rb', line 20 def failed? @source.status.eql? 'failed' end |
#passed? ⇒ Boolean
16 17 18 |
# File 'lib/automate_soup/stage.rb', line 16 def passed? @source.status.eql? 'passed' end |