diff --git a/Rakefile b/Rakefile index 783811bb1..804ff8920 100644 --- a/Rakefile +++ b/Rakefile @@ -8,7 +8,7 @@ begin require 'jeweler' Jeweler::Tasks.new do |gem| gem.add_dependency('excon', '>=0.0.18') - gem.add_dependency('formatador') + gem.add_dependency('formatador', '>=0.0.8') gem.add_dependency('json') gem.add_dependency('mime-types') gem.add_dependency('nokogiri') diff --git a/lib/fog/collection.rb b/lib/fog/collection.rb index 8ac38eecd..0e133d3ca 100644 --- a/lib/fog/collection.rb +++ b/lib/fog/collection.rb @@ -120,6 +120,10 @@ module Fog self.clear.concat(all) end + def table(attributes = nil) + Formatador.display_table(self.map {|instance| instance.attributes}, attributes) + end + private def lazy_load