Class: AwsInventory::Presenter::Json

Inherits:
Base
  • Object
show all
Defined in:
lib/aws_inventory/presenters/json.rb

Instance Method Summary collapse

Methods inherited from Base

#data, #initialize

Constructor Details

This class inherits a constructor from AwsInventory::Presenter::Base

Instance Method Details

#displayObject



4
5
6
7
8
9
10
# File 'lib/aws_inventory/presenters/json.rb', line 4

def display
  json_data = {
    header: data.shift,
    data: data
  }
  puts JSON.pretty_generate(json_data)
end