Class: I18nJS::CLI
- Inherits:
-
Object
- Object
- I18nJS::CLI
- Defined in:
- lib/i18n-js/cli.rb,
lib/i18n-js/cli/ui.rb,
lib/i18n-js/cli/command.rb,
lib/i18n-js/cli/init_command.rb,
lib/i18n-js/cli/check_command.rb,
lib/i18n-js/cli/export_command.rb,
lib/i18n-js/cli/plugins_command.rb,
lib/i18n-js/cli/version_command.rb,
lib/i18n-js/cli/lint_scripts_command.rb,
lib/i18n-js/cli/lint_translations_command.rb
Defined Under Namespace
Classes: CheckCommand, Command, ExportCommand, InitCommand, LintScriptsCommand, LintTranslationsCommand, PluginsCommand, UI, VersionCommand
Instance Attribute Summary collapse
-
#ui ⇒ Object
readonly
Returns the value of attribute ui.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(argv:, stdout:, stderr:, colored: stdout.tty?) ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
Instance Attribute Details
#ui ⇒ Object (readonly)
Returns the value of attribute ui.
16 17 18 |
# File 'lib/i18n-js/cli.rb', line 16 def ui @ui end |
Instance Method Details
#call ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/i18n-js/cli.rb', line 23 def call command_name = @argv.shift command = commands.find {|cmd| cmd.name == command_name } ui.fail_with(root_help) unless command command.call end |