Class: Eco::API::Common::People::DefaultParsers::XLSParser

Inherits:
Loaders::Parser show all
Defined in:
lib/eco/api/common/people/default_parsers/xls_parser.rb

Instance Attribute Summary collapse

Attributes included from Language::AuxiliarLogger

#logger

Instance Method Summary collapse

Methods inherited from Loaders::Parser

active_when_all, active_when_any, #attribute, attribute, dependencies, #initialize, parsing_phase, serializing_phase

Methods inherited from Loaders::CaseBase

#name, name_only_once!

Methods inherited from Loaders::Base

<=>, created_at, #initialize, set_created_at!

Methods included from ClassHelpers

#class_resolver, #descendants, #descendants?, #inheritable_attrs, #inheritable_class_vars, #inherited, #instance_variable_name, #new_class, #resolve_class, #to_constant

Methods included from Language::AuxiliarLogger

#log

Constructor Details

This class inherits a constructor from Eco::API::Common::Loaders::Parser

Instance Attribute Details

#already_requiredObject

Returns the value of attribute already_required.



4
5
6
# File 'lib/eco/api/common/people/default_parsers/xls_parser.rb', line 4

def already_required
  @already_required
end

Instance Method Details

#parser(filename, _deps) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/eco/api/common/people/default_parsers/xls_parser.rb', line 6

def parser(filename, _deps)
  rows(file: filename).tap do |rws|
    rws.each do |row|
      to_string!(row)
    end
  end
end

#serializer(_array_hash, _deps) ⇒ Object



14
15
16
# File 'lib/eco/api/common/people/default_parsers/xls_parser.rb', line 14

def serializer(_array_hash, _deps)
  raise "Not implemented. TODO: using axlsx or rubyXL gems. See: https://spin.atomicobject.com/2017/03/22/parsing-excel-files-ruby/"
end