Class: Chell::CSV

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, options = {}) ⇒ CSV

Returns a new instance of CSV.



10
11
12
13
14
# File 'lib/chell.rb', line 10

def initialize(data, options = {})
  @options = {headers: true}.merge(options)
  @table = ::CSV.new(data, @options).read
  @table.extend ReinforcedCSVTable
end

Instance Attribute Details

#tableObject (readonly)

Returns the value of attribute table.



8
9
10
# File 'lib/chell.rb', line 8

def table
  @table
end

Instance Method Details

#run_shell!Object



16
17
18
# File 'lib/chell.rb', line 16

def run_shell!
  @table.pry
end