Class: Escort::Formatter::GlobalCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/escort/formatter/global_command.rb

Instance Attribute Summary

Attributes inherited from Command

#context, #name, #setup

Instance Method Summary collapse

Methods inherited from Command

#aliases, #child_commands, #has_aliases?, #has_child_commands?, #name_with_aliases, #outline, #requires_arguments?, #script_name, #usage

Constructor Details

#initialize(setup) ⇒ GlobalCommand

Returns a new instance of GlobalCommand.



4
5
6
# File 'lib/escort/formatter/global_command.rb', line 4

def initialize(setup)
  super(:global, setup, [])
end

Instance Method Details

#descriptionObject



12
13
14
# File 'lib/escort/formatter/global_command.rb', line 12

def description
  @description ||= setup.description_for(context) || ""
end

#summaryObject



8
9
10
# File 'lib/escort/formatter/global_command.rb', line 8

def summary
  @summary ||= setup.summary_for(context) || ""
end