Class: AutomateSoup::Stage

Inherits:
Object
  • Object
show all
Defined in:
lib/automate_soup/stage.rb

Overview

Class to represent operations on a stage.

Instance Method Summary collapse

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

Returns:

  • (Boolean)


20
21
22
# File 'lib/automate_soup/stage.rb', line 20

def failed?
  @source.status.eql? 'failed'
end

#passed?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/automate_soup/stage.rb', line 16

def passed?
  @source.status.eql? 'passed'
end