Class: Ea::Cli::App
- Inherits:
-
Thor
- Object
- Thor
- Ea::Cli::App
- Defined in:
- lib/ea/cli/app.rb
Constant Summary collapse
- OUTPUT_OPTION =
Shared kwargs for any command that writes to a file. Keeping the short-form alias in one place makes the CLI surface consistent and the convention a single source of truth: changing
-oeverywhere is a one-line edit, not a per-command search, and every output-bearing command honours the same flag. { type: :string, aliases: :o }.freeze
- CONFIG_OPTION =
Shared kwargs for any command that accepts a YAML config file. Matches the OUTPUT_OPTION pattern so adding config-file support to another command is a one-line addition.
{ type: :string, aliases: :c }.freeze
Class Method Summary collapse
Instance Method Summary collapse
- #convert(file) ⇒ Object
- #diagrams(action, file = nil, name = nil) ⇒ Object
- #list(file) ⇒ Object
- #parse(file) ⇒ Object
- #spa(file) ⇒ Object
- #stats(file) ⇒ Object
- #validate(file) ⇒ Object
- #version ⇒ Object
Class Method Details
.exit_on_failure? ⇒ Boolean
21 22 23 |
# File 'lib/ea/cli/app.rb', line 21 def exit_on_failure? true end |
Instance Method Details
#convert(file) ⇒ Object
73 74 75 |
# File 'lib/ea/cli/app.rb', line 73 def convert(file) Command::Convert.new(file: file, **symbolize()).call end |
#diagrams(action, file = nil, name = nil) ⇒ Object
44 45 46 47 48 |
# File 'lib/ea/cli/app.rb', line 44 def diagrams(action, file = nil, name = nil) Command::Diagrams .new(action: action, file: file, name: name, **symbolize()) .call end |
#list(file) ⇒ Object
36 37 38 |
# File 'lib/ea/cli/app.rb', line 36 def list(file) Command::List.new(file: file, **symbolize()).call end |
#parse(file) ⇒ Object
65 66 67 |
# File 'lib/ea/cli/app.rb', line 65 def parse(file) Command::Parse.new(file: file, **symbolize()).call end |
#spa(file) ⇒ Object
85 86 87 |
# File 'lib/ea/cli/app.rb', line 85 def spa(file) Command::Spa.new(file: file, **symbolize()).call end |
#stats(file) ⇒ Object
58 59 60 |
# File 'lib/ea/cli/app.rb', line 58 def stats(file) Command::Stats.new(file: file, **symbolize()).call end |