Module: DeltaCloud::PlainFormatter

Defined in:
lib/plain_formatter.rb

Defined Under Namespace

Modules: FormatObject

Instance Method Summary collapse

Instance Method Details

#format(obj) ⇒ Object



79
80
81
82
83
# File 'lib/plain_formatter.rb', line 79

def format(obj)
  object_name = obj.class.name.classify.gsub(/^DeltaCloud::API::/, '')
  format_class = DeltaCloud::PlainFormatter::FormatObject.const_get(object_name)
  format_class.new(obj).format
end