Class: StiDeploy::DeployType
- Inherits:
-
Object
- Object
- StiDeploy::DeployType
- Defined in:
- lib/sti_deploy/deploy_type.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #full_name ⇒ Object
-
#initialize(type) ⇒ DeployType
constructor
A new instance of DeployType.
- #to_s ⇒ Object
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
#type ⇒ Object (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_name ⇒ Object
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_s ⇒ Object
15 16 17 |
# File 'lib/sti_deploy/deploy_type.rb', line 15 def to_s type end |