Class: MyLicence
- Inherits:
-
SimpleOpencBot
- Object
- SimpleOpencBot
- MyLicence
- Defined in:
- lib/openc_bot/templates/lib/simple_bot.rb
Constant Summary
Constants included from OpencBot
Instance Method Summary collapse
-
#fetch_all_records(opts = {}) ⇒ Object
This method should yield Records.
Methods inherited from SimpleOpencBot
#all_stored_records, #check_unique_index, #count_stored_records, #export_data, inherited, #select_records, #spotcheck_data, #spotcheck_records, #sqlite_magic_connection, #unexported_stored_records, #update_data, #validate_data, yields
Methods included from OpencBot
#db_location, #db_name, #export, extended, #insert_or_update, #root_directory, #save_data, #save_run_report, #spotcheck, #sqlite_busy_timeout, #sqlite_magic_connection, #table_summary, #unlock_database, #verbose?
Methods included from OpencBot::Helpers::Text
#normalise_utf8_spaces, #strip_all_spaces
Instance Method Details
#fetch_all_records(opts = {}) ⇒ Object
This method should yield Records. It must be defined.
61 62 63 64 65 66 67 |
# File 'lib/openc_bot/templates/lib/simple_bot.rb', line 61 def fetch_all_records(opts={}) data = [{:name => "A", :type => "B"}] data.each do |datum| yield MyLicenceRecord.new( datum.merge(:reporting_date => Time.now.iso8601(2))) end end |