Class: Hyperb::Snapshot
- Inherits:
-
Object
- Object
- Hyperb::Snapshot
- Defined in:
- lib/hyperb/snapshots/snapshot.rb
Overview
snapshot object
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#size ⇒ Object
Returns the value of attribute size.
-
#volume ⇒ Object
Returns the value of attribute volume.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Snapshot
constructor
A new instance of Snapshot.
Constructor Details
#initialize(attrs = {}) ⇒ Snapshot
Returns a new instance of Snapshot.
6 7 8 9 10 |
# File 'lib/hyperb/snapshots/snapshot.rb', line 6 def initialize(attrs = {}) attrs.each do |k, v| instance_variable_set("@#{k.downcase.to_sym}", v) end end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/hyperb/snapshots/snapshot.rb', line 4 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/hyperb/snapshots/snapshot.rb', line 4 def name @name end |
#size ⇒ Object
Returns the value of attribute size.
4 5 6 |
# File 'lib/hyperb/snapshots/snapshot.rb', line 4 def size @size end |
#volume ⇒ Object
Returns the value of attribute volume.
4 5 6 |
# File 'lib/hyperb/snapshots/snapshot.rb', line 4 def volume @volume end |