Method: BaseChip::Cli::Data#full_command

Defined in:
lib/base_chip/cli.rb

#full_command(task = nil, with_options = true) ⇒ Object



240
241
242
243
244
245
246
247
248
249
250
251
252
# File 'lib/base_chip/cli.rb', line 240

def full_command(task = nil, with_options=true)
  task = task.to_s if task
  n = if self.parent_command 
    self.parent_command.full_command((task.nil? ? nil : self.name),with_options)
  else
    File.basename($0)
  end
  if task
    n + ' ' + task
  else
    n
  end
end