Class: Choosy::SuperCommand

Inherits:
BaseCommand show all
Defined in:
lib/choosy/super_command.rb

Instance Attribute Summary collapse

Attributes inherited from BaseCommand

#builder, #listing, #name, #option_builders, #printer, #summary

Instance Method Summary collapse

Methods inherited from BaseCommand

#alter, #execute!, #initialize, #options, #parse!

Constructor Details

This class inherits a constructor from Choosy::BaseCommand

Instance Attribute Details

#default_commandObject

Returns the value of attribute default_command.



3
4
5
# File 'lib/choosy/super_command.rb', line 3

def default_command
  @default_command
end

#metanameObject

Returns the value of attribute metaname.



3
4
5
# File 'lib/choosy/super_command.rb', line 3

def metaname
  @metaname
end

Instance Method Details

#command_buildersObject



5
6
7
# File 'lib/choosy/super_command.rb', line 5

def command_builders
  @command_builders ||= {}
end

#commandsObject



9
10
11
# File 'lib/choosy/super_command.rb', line 9

def commands
  @command_builders.values.map {|b| b.entity }
end

#finalize!Object



25
26
27
28
# File 'lib/choosy/super_command.rb', line 25

def finalize!
  super
  @metaname ||= 'COMMAND'
end

#has_default?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/choosy/super_command.rb', line 21

def has_default?
  !@default_command.nil?
end

#parsimonious=(value) ⇒ Object



13
14
15
# File 'lib/choosy/super_command.rb', line 13

def parsimonious=(value)
  @parsimonious = value
end

#parsimonious?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/choosy/super_command.rb', line 17

def parsimonious?
  @parsimonious ||= false
end