Class: Analects::HskLoader
- Inherits:
-
Object
- Object
- Analects::HskLoader
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/analects/hsk_loader.rb
Defined Under Namespace
Classes: HskEntry
Constant Summary collapse
- FIELDS =
[:level, :simplified, :traditional, :pinyin]
Instance Method Summary collapse
-
#initialize(io, library) ⇒ HskLoader
constructor
A new instance of HskLoader.
Constructor Details
#initialize(io, library) ⇒ HskLoader
Returns a new instance of HskLoader.
21 22 23 24 25 |
# File 'lib/analects/hsk_loader.rb', line 21 def initialize(io, library) @contents = CSV(io.read).map do |level, simplified, traditional, | HskEntry.new(library, level, simplified, traditional, ) end end |