Class: ChecksConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/heroploy/config/checks_config.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#branchObject

Returns the value of attribute branch.



3
4
5
# File 'lib/heroploy/config/checks_config.rb', line 3

def branch
  @branch
end

#pushedObject

Returns the value of attribute pushed.



2
3
4
# File 'lib/heroploy/config/checks_config.rb', line 2

def pushed
  @pushed
end

#stagedObject

Returns the value of attribute staged.



4
5
6
# File 'lib/heroploy/config/checks_config.rb', line 4

def staged
  @staged
end

Class Method Details

.parse(attrs) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/heroploy/config/checks_config.rb', line 6

def self.parse(attrs)
  config = ChecksConfig.new
  
  attrs ||= {}
  config.pushed = attrs['pushed']
  config.branch = attrs['branch']
  config.staged = attrs['staged'] == true ? 'staging' : attrs['staged']
  
  config
end