Class: YamlSmith::CLI
- Inherits:
-
Object
- Object
- YamlSmith::CLI
- Defined in:
- lib/yaml_smith/cli.rb
Overview
Dispatches command-line arguments to a YAML Smith command.
Constant Summary collapse
- COMMANDS =
{ 'add' => AddKey, 'set' => SetKey, 'delete' => DeleteKey }.freeze
- USAGE =
'Usage: yaml-smith COMMAND FILE KEY [VALUE]'
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(arguments) ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
#initialize(arguments) ⇒ CLI
Returns a new instance of CLI.
19 20 21 |
# File 'lib/yaml_smith/cli.rb', line 19 def initialize(arguments) @arguments = arguments end |
Class Method Details
.call(arguments) ⇒ Object
15 16 17 |
# File 'lib/yaml_smith/cli.rb', line 15 def self.call(arguments) new(arguments).call end |