Class: S3Secure::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/s3_secure/table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options, data) ⇒ Table

Returns a new instance of Table.



6
7
8
9
# File 'lib/s3_secure/table.rb', line 6

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

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



5
6
7
# File 'lib/s3_secure/table.rb', line 5

def data
  @data
end

Instance Method Details

#displayObject



11
12
13
14
15
16
# File 'lib/s3_secure/table.rb', line 11

def display
  table = Text::Table.new
  table.head = data.shift
  table.rows = data
  puts table
end