Class: InvisibleCollector::Model::Alarm
- Inherits:
-
AbstractModel
- Object
- AbstractModel
- InvisibleCollector::Model::Alarm
- Defined in:
- lib/invisible_collector/models/alarm.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#gid ⇒ Object
Returns the value of attribute gid.
-
#status ⇒ Object
Returns the value of attribute status.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Alarm
constructor
A new instance of Alarm.
Methods included from ModelAttributes
Constructor Details
#initialize(options = {}) ⇒ Alarm
Returns a new instance of Alarm.
11 12 13 14 15 16 17 |
# File 'lib/invisible_collector/models/alarm.rb', line 11 def initialize( = {}) = .with_indifferent_access @gid = [:gid] @status = [:status] @created_at = Time.parse([:created_at]) if [:created_at] @updated_at = Time.parse([:updated_at]) if [:updated_at] end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
8 9 10 |
# File 'lib/invisible_collector/models/alarm.rb', line 8 def created_at @created_at end |
#gid ⇒ Object
Returns the value of attribute gid.
6 7 8 |
# File 'lib/invisible_collector/models/alarm.rb', line 6 def gid @gid end |
#status ⇒ Object
Returns the value of attribute status.
7 8 9 |
# File 'lib/invisible_collector/models/alarm.rb', line 7 def status @status end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
9 10 11 |
# File 'lib/invisible_collector/models/alarm.rb', line 9 def updated_at @updated_at end |