Class: I18nJSON::CLI
- Inherits:
-
Object
- Object
- I18nJSON::CLI
- Defined in:
- lib/i18n-json/cli.rb,
lib/i18n-json/cli/ui.rb,
lib/i18n-json/cli/command.rb,
lib/i18n-json/cli/init_command.rb,
lib/i18n-json/cli/export_command.rb
Defined Under Namespace
Classes: Command, ExportCommand, InitCommand, UI
Instance Attribute Summary collapse
-
#ui ⇒ Object
readonly
Returns the value of attribute ui.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(argv:, stdout:, stderr:) ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
Instance Attribute Details
#ui ⇒ Object (readonly)
Returns the value of attribute ui.
5 6 7 |
# File 'lib/i18n-json/cli.rb', line 5 def ui @ui end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/i18n-json/cli.rb', line 12 def call command_name = @argv.shift command = commands.find {|cmd| cmd.name == command_name } ui.fail_with(root_help) unless command command.call end |