Class: Corona::DB
- Inherits:
-
Object
- Object
- Corona::DB
- Defined in:
- lib/corona/db/db.rb,
lib/corona/db/model.rb
Defined Under Namespace
Classes: Device
Instance Method Summary collapse
- #add(record) ⇒ Object
-
#initialize ⇒ DB
constructor
A new instance of DB.
- #old(ip, oid_sysName) ⇒ Object
- #update(record, where) ⇒ Object
Constructor Details
Instance Method Details
#add(record) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/corona/db/db.rb', line 11 def add record record[:first_seen] = record[:last_seen] = Time.now.utc record[:active] = true Log.debug "adding: #{record}" Device.new(record).save end |