Module: Prmd::CLI::Combine
- Extended by:
- Base
- Defined in:
- lib/prmd/cli/combine.rb
Overview
‘combine’ command module.
Class Method Summary collapse
-
.execute(options = {}) ⇒ void
Executes the ‘combine’ command.
-
.make_parser(options = {}) ⇒ OptionParser
Returns a OptionParser for parsing ‘combine’ command options.
Methods included from Base
execute, make_parser, noop_execute, parse_options, run
Class Method Details
.execute(options = {}) ⇒ void
This method returns an undefined value.
Executes the ‘combine’ command.
37 38 39 |
# File 'lib/prmd/cli/combine.rb', line 37 def self.execute( = {}) write_result Prmd.combine([:argv], ).to_s, end |
.make_parser(options = {}) ⇒ OptionParser
Returns a OptionParser for parsing ‘combine’ command options.
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/prmd/cli/combine.rb', line 14 def self.make_parser( = {}) binname = .fetch(:bin, 'prmd') OptionParser.new do |opts| opts. = "#{binname} combine [options] <file or directory>" opts.on('-m', '--meta FILENAME', String, 'Set defaults for schemata') do |m| yield :meta, m end opts.on('-o', '--output-file FILENAME', String, 'File to write result to') do |n| yield :output_file, n end end end |