Class: Csv2schema::CSV

Inherits:
Object
  • Object
show all
Includes:
Formats, Required, Schema
Defined in:
lib/csv2schema/csv.rb

Instance Method Summary collapse

Methods included from Schema

#get_type, #schema

Methods included from Required

#apply_required

Methods included from Formats

#apply_formats

Constructor Details

#initialize(io) ⇒ CSV

Returns a new instance of CSV.



7
8
9
10
11
12
# File 'lib/csv2schema/csv.rb', line 7

def initialize(io)
  @validator = Csv2schema::Validator.new(io)
  @column_headers = get_column_headers
  apply_formats
  apply_required
end