Class: StiDeploy::DeployType

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ DeployType

Returns a new instance of DeployType.



7
8
9
# File 'lib/sti_deploy/deploy_type.rb', line 7

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



11
12
13
# File 'lib/sti_deploy/deploy_type.rb', line 11

def full_name
  { h: 'staging', f: 'hotfix', p: 'project' }[type.to_sym]
end

#to_sObject



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

def to_s
  type
end