Class: StiDeploy::DeployType

Inherits:
Object
  • Object
show all
Defined in:
lib/sti_deploy/deploy_type.rb

Constant Summary collapse

DEPLOY_TYPES =
{
  c: 'release_candidate',
  h: 'hotfix',
  p: 'pre_release',
  r: 'release'
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ DeployType

Returns a new instance of DeployType.



14
15
16
# File 'lib/sti_deploy/deploy_type.rb', line 14

def initialize(type)
  @type = type.downcase
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/sti_deploy/deploy_type.rb', line 5

def type
  @type
end

Instance Method Details

#full_nameObject



18
19
20
# File 'lib/sti_deploy/deploy_type.rb', line 18

def full_name
  DEPLOY_TYPES[type.to_sym]
end

#to_sObject



22
23
24
# File 'lib/sti_deploy/deploy_type.rb', line 22

def to_s
  full_name
end