Class: Bosh::AwsCloud::VolumesCreatePresenter
- Inherits:
-
Object
- Object
- Bosh::AwsCloud::VolumesCreatePresenter
- Defined in:
- lib/cloud/aws/volumes_create_presenter.rb
Instance Attribute Summary collapse
-
#volume_properties ⇒ Object
readonly
Returns the value of attribute volume_properties.
Instance Method Summary collapse
-
#initialize(volume_properties) ⇒ VolumesCreatePresenter
constructor
A new instance of VolumesCreatePresenter.
- #present ⇒ Object
Constructor Details
#initialize(volume_properties) ⇒ VolumesCreatePresenter
Returns a new instance of VolumesCreatePresenter.
5 6 7 |
# File 'lib/cloud/aws/volumes_create_presenter.rb', line 5 def initialize(volume_properties) @volume_properties = volume_properties end |
Instance Attribute Details
#volume_properties ⇒ Object (readonly)
Returns the value of attribute volume_properties.
4 5 6 |
# File 'lib/cloud/aws/volumes_create_presenter.rb', line 4 def volume_properties @volume_properties end |
Instance Method Details
#present ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/cloud/aws/volumes_create_presenter.rb', line 9 def present = { size: (volume_properties.size / 1024.0).ceil, availability_zone: volume_properties.az, volume_type: volume_properties.type, encrypted: volume_properties.encrypted } [:iops] = volume_properties.iops if volume_properties.iops end |