Class: Hyperb::Snapshot

Inherits:
Object
  • Object
show all
Defined in:
lib/hyperb/snapshots/snapshot.rb

Overview

snapshot object

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/hyperb/snapshots/snapshot.rb', line 4

def id
  @id
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/hyperb/snapshots/snapshot.rb', line 4

def name
  @name
end

#sizeObject

Returns the value of attribute size.



4
5
6
# File 'lib/hyperb/snapshots/snapshot.rb', line 4

def size
  @size
end

#volumeObject

Returns the value of attribute volume.



4
5
6
# File 'lib/hyperb/snapshots/snapshot.rb', line 4

def volume
  @volume
end