Class: Lutaml::Cli::UmlCommands
- Inherits:
-
Thor
- Object
- Thor
- Lutaml::Cli::UmlCommands
- Defined in:
- lib/lutaml/cli/uml_commands.rb
Overview
UmlCommands provides CLI commands for UML repository operations
This is the main CLI interface for working with UML models from XMI and QEA files. Follows MECE (Mutually Exclusive, Collectively Exhaustive) principles and Docker-like command conventions.
Command categories:
-
Resource Lifecycle: build, info, validate
-
Viewing: ls, inspect, tree, stats
-
Querying: search, find
-
Output: export, docs, serve
-
Development: repl, verify
This class serves as a thin delegation layer to individual command classes, keeping the Thor integration separate from business logic.
Class Method Summary collapse
-
.exit_on_failure? ⇒ Boolean
Make Thor raise errors instead of exiting.
Instance Method Summary collapse
- #build(model_path) ⇒ Object
- #build_spa(input_path) ⇒ Object
- #diagram(action, *args) ⇒ Object
- #export(lur_path) ⇒ Object
- #find(lur_path) ⇒ Object
- #info(lur_path) ⇒ Object
- #inspect(lur_path, element_id) ⇒ Object
- #list(lur_path, path = nil) ⇒ Object
- #repl(lur_path) ⇒ Object
- #search(lur_path, query) ⇒ Object
- #serve(lur_path) ⇒ Object
- #stats(lur_path, path = nil) ⇒ Object
- #tree(lur_path, path = nil) ⇒ Object
- #validate(file_path) ⇒ Object
- #verify(xmi_path, qea_path) ⇒ Object
Class Method Details
.exit_on_failure? ⇒ Boolean
Make Thor raise errors instead of exiting
43 44 45 |
# File 'lib/lutaml/cli/uml_commands.rb', line 43 def self.exit_on_failure? false end |
Instance Method Details
#build(model_path) ⇒ Object
57 58 59 |
# File 'lib/lutaml/cli/uml_commands.rb', line 57 def build(model_path) Uml::BuildCommand.new(.to_h).run(model_path) end |
#build_spa(input_path) ⇒ Object
130 131 132 |
# File 'lib/lutaml/cli/uml_commands.rb', line 130 def build_spa(input_path) Uml::SpaCommand.new(.to_h).run(input_path) end |
#diagram(action, *args) ⇒ Object
142 143 144 |
# File 'lib/lutaml/cli/uml_commands.rb', line 142 def diagram(action, *args) Uml::DiagramCommand.new(.to_h).run(action, *args) end |
#export(lur_path) ⇒ Object
123 124 125 |
# File 'lib/lutaml/cli/uml_commands.rb', line 123 def export(lur_path) Uml::ExportCommand.new(.to_h).run(lur_path) end |
#find(lur_path) ⇒ Object
113 114 115 |
# File 'lib/lutaml/cli/uml_commands.rb', line 113 def find(lur_path) Uml::FindCommand.new(.to_h).run(lur_path) end |
#info(lur_path) ⇒ Object
63 64 65 |
# File 'lib/lutaml/cli/uml_commands.rb', line 63 def info(lur_path) Uml::InfoCommand.new(.to_h).run(lur_path) end |
#inspect(lur_path, element_id) ⇒ Object
85 86 87 |
# File 'lib/lutaml/cli/uml_commands.rb', line 85 def inspect(lur_path, element_id) Uml::InspectCommand.new(.to_h).run(lur_path, element_id) end |
#list(lur_path, path = nil) ⇒ Object
79 80 81 |
# File 'lib/lutaml/cli/uml_commands.rb', line 79 def list(lur_path, path = nil) Uml::LsCommand.new(.to_h).run(lur_path, path) end |
#repl(lur_path) ⇒ Object
152 153 154 |
# File 'lib/lutaml/cli/uml_commands.rb', line 152 def repl(lur_path) Uml::ReplCommand.new(.to_h).run(lur_path) end |
#search(lur_path, query) ⇒ Object
107 108 109 |
# File 'lib/lutaml/cli/uml_commands.rb', line 107 def search(lur_path, query) Uml::SearchCommand.new(.to_h).run(lur_path, query) end |
#serve(lur_path) ⇒ Object
136 137 138 |
# File 'lib/lutaml/cli/uml_commands.rb', line 136 def serve(lur_path) Uml::ServeCommand.new(.to_h).run(lur_path) end |
#stats(lur_path, path = nil) ⇒ Object
97 98 99 |
# File 'lib/lutaml/cli/uml_commands.rb', line 97 def stats(lur_path, path = nil) Uml::StatsCommand.new(.to_h).run(lur_path, path) end |
#tree(lur_path, path = nil) ⇒ Object
91 92 93 |
# File 'lib/lutaml/cli/uml_commands.rb', line 91 def tree(lur_path, path = nil) Uml::TreeCommand.new(.to_h).run(lur_path, path) end |
#validate(file_path) ⇒ Object
69 70 71 |
# File 'lib/lutaml/cli/uml_commands.rb', line 69 def validate(file_path) Uml::ValidateCommand.new(.to_h).run(file_path) end |
#verify(xmi_path, qea_path) ⇒ Object
158 159 160 |
# File 'lib/lutaml/cli/uml_commands.rb', line 158 def verify(xmi_path, qea_path) Uml::VerifyCommand.new(.to_h).run(xmi_path, qea_path) end |