Class: Rmsgen::Runtime
- Inherits:
-
Object
- Object
- Rmsgen::Runtime
- Defined in:
- lib/rmsgen/runtime.rb
Instance Method Summary collapse
-
#initialize(config) ⇒ Runtime
constructor
A new instance of Runtime.
- #run! ⇒ Object
Constructor Details
#initialize(config) ⇒ Runtime
Returns a new instance of Runtime.
4 5 6 7 8 9 10 |
# File 'lib/rmsgen/runtime.rb', line 4 def initialize(config) @config = config raise "Ensure you have populated a config file" unless @config @output = config['output_file'] @notes = PolnoteGroup.fetch(polnote_source) run! end |
Instance Method Details
#run! ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/rmsgen/runtime.rb', line 12 def run! puts 'no polnotes in queue' if @notes.empty? @notes.each do |note| system('clear') polnote = Rmsgen::Polnote.new(:body => note) Rmsgen::Inquirer.inquire_about_note(polnote) write(polnote) end end |