Class: Glossarist::CLI::PackageCommand
- Inherits:
-
Object
- Object
- Glossarist::CLI::PackageCommand
- Defined in:
- lib/glossarist/cli/package_command.rb
Instance Method Summary collapse
-
#initialize(dir, options) ⇒ PackageCommand
constructor
A new instance of PackageCommand.
- #run ⇒ Object
Constructor Details
#initialize(dir, options) ⇒ PackageCommand
Returns a new instance of PackageCommand.
6 7 8 9 |
# File 'lib/glossarist/cli/package_command.rb', line 6 def initialize(dir, ) @dir = dir = end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/glossarist/cli/package_command.rb', line 11 def run GcrPackage.create_from_directory( @dir, output: [:output], shortname: [:shortname], version: [:version], title: [:title], description: [:description], owner: [:owner], tags: [:tags], register_yaml: [:register_yaml], uri_prefix: [:uri_prefix], concept_uri_template: [:concept_uri_template], compiled_formats: parse_compiled_formats, ) puts "Created #{@options[:output]}" rescue ArgumentError => e warn "Error: #{e.message}" exit 1 end |