Class: Budik::Command
- Inherits:
-
Object
- Object
- Budik::Command
- Defined in:
- lib/budik/command.rb
Overview
‘Command’ class holds definitions of CLI commands.
Instance Method Summary collapse
-
#initialize(command, opts) ⇒ Command
constructor
Loads options, sources and strings.
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. @sources = Config.instance.sources @strings = Config.instance.lang.command send(command, opts) end |