Class: Bosh::Cli::JobCommandArgs
- Defined in:
- lib/cli/job_command_args.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#id ⇒ Object
Returns the value of attribute id.
-
#job ⇒ Object
Returns the value of attribute job.
Instance Method Summary collapse
- #index ⇒ Object
-
#initialize(args) ⇒ JobCommandArgs
constructor
A new instance of JobCommandArgs.
Constructor Details
#initialize(args) ⇒ JobCommandArgs
Returns a new instance of JobCommandArgs.
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/cli/job_command_args.rb', line 3 def initialize(args) job = args.shift err('Please provide job name') if job.nil? job, id = job.split('/', 2) id = args.shift if id.nil? self.job = job self.id = id self.args = args end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args
2 3 4 |
# File 'lib/cli/job_command_args.rb', line 2 def args @args end |
#id ⇒ Object
Returns the value of attribute id
2 3 4 |
# File 'lib/cli/job_command_args.rb', line 2 def id @id end |
#job ⇒ Object
Returns the value of attribute job
2 3 4 |
# File 'lib/cli/job_command_args.rb', line 2 def job @job end |
Instance Method Details
#index ⇒ Object
15 16 17 |
# File 'lib/cli/job_command_args.rb', line 15 def index id end |