Module: Hyrum
- Defined in:
- lib/hyrum.rb,
lib/hyrum/version.rb,
lib/hyrum/script_options.rb,
lib/hyrum/formats/formatter.rb,
lib/hyrum/generators/fake_generator.rb,
lib/hyrum/generators/openai_generator.rb,
lib/hyrum/generators/message_generator.rb
Defined Under Namespace
Modules: Formats, Generators Classes: ScriptOptions, ScriptOptionsError
Constant Summary collapse
- VERSION =
'0.1.0'
Class Method Summary collapse
Class Method Details
.run(args) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/hyrum.rb', line 9 def self.run(args) = ScriptOptions.new(args).parse generator_opts = .slice(:message, :key, :ai_service, :ai_model, :number, :verbose) formatter_opts = .slice(:format, :verbose) puts "Options: #{.inspect}" if [:verbose] formatter = Formats::Formatter.new(formatter_opts) = Generators::MessageGenerator.create(generator_opts) = .generate output = formatter.format() puts output rescue ScriptOptionsError => e puts e. exit end |