Class: Chell::CSV
- Inherits:
-
Object
- Object
- Chell::CSV
- Defined in:
- lib/chell.rb
Instance Attribute Summary collapse
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
-
#initialize(data, options = {}) ⇒ CSV
constructor
A new instance of CSV.
- #run_shell! ⇒ Object
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 = {headers: true}.merge() @table = ::CSV.new(data, @options).read @table.extend ReinforcedCSVTable end |
Instance Attribute Details
#table ⇒ Object (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 |