Class: DeltaCloud::PlainFormatter::FormatObject::StorageSnapshot

Inherits:
Base
  • Object
show all
Defined in:
lib/plain_formatter.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from DeltaCloud::PlainFormatter::FormatObject::Base

Instance Method Details

#formatObject



67
68
69
70
71
72
73
74
# File 'lib/plain_formatter.rb', line 67

def format
  sprintf("%-10s | %-15s | %-6s | %15s",
    @obj.id[0,10],
    @obj.storage_volume.respond_to?('name') ? @obj.storage_volume.name[0, 15] : 'unknown',
    @obj.state ? @obj.state[0,10] : 'unknown',
    @obj.created ? @obj.created[0,19] : 'unknown'
  )
end