Class: Budik::Command

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

Overview

‘Command’ class holds definitions of CLI commands.

Instance Method Summary collapse

Constructor Details

#initialize(command, opts) ⇒ Command

Loads options, sources and strings. Runs command and passes specified options to it.

  • Args:

    • command -> Command to run (Symbol)

    • opts -> Command line options (Ruby Commander’s object)



20
21
22
23
24
25
26
# File 'lib/budik/command.rb', line 20

def initialize(command, opts)
  @options = Config.instance.options
  @sources = Config.instance.sources
  @strings = Config.instance.lang.command

  send(command, opts)
end