Class: AwsInventory::Presenter::Base

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

Direct Known Subclasses

Json, Tab, Table

Instance Method Summary collapse

Constructor Details

#initialize(options, data) ⇒ Base

Returns a new instance of Base.



2
3
4
5
# File 'lib/aws_inventory/presenters/base.rb', line 2

def initialize(options, data)
  @options = options
  @data = data
end

Instance Method Details

#dataObject



7
8
9
# File 'lib/aws_inventory/presenters/base.rb', line 7

def data
  @options[:header] ? @data : @data[1..-1]  # remove the header row
end