Class: Svgeez::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/svgeez/command.rb

Class Method Summary collapse

Class Method Details

.inherited(base) ⇒ Object



8
9
10
11
# File 'lib/svgeez/command.rb', line 8

def inherited(base)
  subclasses << base
  super(base)
end

.init_with_program(program) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/svgeez/command.rb', line 13

def init_with_program(program)
  program.command(name.split('::').last.downcase.to_sym) do |command|
    command.description command_description
    command.syntax command_syntax

    add_actions(command)
    add_options(command)
  end
end

.subclassesObject



4
5
6
# File 'lib/svgeez/command.rb', line 4

def subclasses
  @subclasses ||= []
end