Class: Bouncer::Activation
- Inherits:
-
Object
- Object
- Bouncer::Activation
- Defined in:
- lib/bouncer-client/activation.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#device_id ⇒ Object
Returns the value of attribute device_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#unit_id ⇒ Object
Returns the value of attribute unit_id.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Class Method Summary collapse
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/bouncer-client/activation.rb', line 3 def created_at @created_at end |
#device_id ⇒ Object
Returns the value of attribute device_id.
4 5 6 |
# File 'lib/bouncer-client/activation.rb', line 4 def device_id @device_id end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/bouncer-client/activation.rb', line 3 def id @id end |
#unit_id ⇒ Object
Returns the value of attribute unit_id.
4 5 6 |
# File 'lib/bouncer-client/activation.rb', line 4 def unit_id @unit_id end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
3 4 5 |
# File 'lib/bouncer-client/activation.rb', line 3 def updated_at @updated_at end |
#user_id ⇒ Object
Returns the value of attribute user_id.
4 5 6 |
# File 'lib/bouncer-client/activation.rb', line 4 def user_id @user_id end |
Class Method Details
.from_json(json) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/bouncer-client/activation.rb', line 6 def self.from_json json activation = Activation.new json.keys.map do |key| activation.class.class_eval { attr_accessor key.to_sym } activation.send("#{key}=", json[key]) end activation end |