Class: Phase::CLI::Deploy
Instance Attribute Summary collapse
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
Attributes inherited from Command
Instance Method Summary collapse
-
#initialize(args, options) ⇒ Deploy
constructor
A new instance of Deploy.
- #run ⇒ Object
Methods included from Util::Console
Constructor Details
#initialize(args, options) ⇒ Deploy
Returns a new instance of Deploy.
20 21 22 23 |
# File 'lib/phase/cli/deploy.rb', line 20 def initialize(args, ) @environment = args.first super end |
Instance Attribute Details
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
18 19 20 |
# File 'lib/phase/cli/deploy.rb', line 18 def environment @environment end |
Instance Method Details
#run ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/phase/cli/deploy.rb', line 25 def run if environment == "sandbox" deployment = ::Phase::Deploy::SandboxDeployment.new else deployment = ::Phase::Deploy::Deployment.new(environment) end deployment.execute! end |