Class: DeltaCloud::PlainFormatter::FormatObject::StorageVolume
- Inherits:
-
Base
- Object
- Base
- DeltaCloud::PlainFormatter::FormatObject::StorageVolume
- Defined in:
- lib/plain_formatter.rb
Instance Method Summary (collapse)
Methods inherited from Base
Constructor Details
This class inherits a constructor from DeltaCloud::PlainFormatter::FormatObject::Base
Instance Method Details
- (Object) format
55 56 57 58 59 60 61 62 63 |
# File 'lib/plain_formatter.rb', line 55 def format sprintf("%-10s | %15s GB | %-10s | %-10s | %-15s", @obj.id[0,10], @obj.capacity ? @obj.capacity.to_s[0,15] : 'unknown', @obj.device ? @obj.device[0,10] : 'unknown', @obj.respond_to?('state') ? @obj.state[0,10] : 'unknown', @obj.instance ? @obj.instance.name[0,15] : 'unknown' ) end |