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.



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

def default_command
  @default_command
end

#metanameObject

Returns the value of attribute metaname.



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

def metaname
  @metaname
end

Instance Method Details

#command_buildersObject



11
12
13
# File 'lib/choosy/super_command.rb', line 11

def command_builders
  @command_builders ||= {}
end

#commandsObject



15
16
17
# File 'lib/choosy/super_command.rb', line 15

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

#finalize!Object



31
32
33
34
# File 'lib/choosy/super_command.rb', line 31

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

#has_default?Boolean

Returns:

  • (Boolean)


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

def has_default?
  !@default_command.nil?
end

#parsimonious=(value) ⇒ Object



19
20
21
# File 'lib/choosy/super_command.rb', line 19

def parsimonious=(value)
  @parsimonious = value
end

#parsimonious?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/choosy/super_command.rb', line 23

def parsimonious?
  @parsimonious ||= false
end