Methods

DeltaCloud::PlainFormatter::FormatObject::StorageVolume

Public Instance Methods

format() click to toggle source
# File lib/plain_formatter.rb, line 73
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

[Validate]

Generated with the Darkfish Rdoc Generator 2.