mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
add table formatting for collections
This commit is contained in:
parent
16a6210814
commit
988d6276c0
2 changed files with 5 additions and 1 deletions
2
Rakefile
2
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')
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue