Class: SportDb::TeamReader
- Inherits:
-
Object
- Object
- SportDb::TeamReader
- Includes:
- LogUtils::Logging, Model
- Defined in:
- lib/sportdb/readers/team.rb
Constant Summary
Constants included from Model
Model::City, Model::Continent, Model::Country, Model::Person, Model::Prop, Model::Region
Instance Attribute Summary collapse
-
#include_path ⇒ Object
readonly
Returns the value of attribute include_path.
Instance Method Summary collapse
-
#initialize(include_path, opts = {}) ⇒ TeamReader
constructor
A new instance of TeamReader.
- #read(name, more_attribs = {}) ⇒ Object
Constructor Details
#initialize(include_path, opts = {}) ⇒ TeamReader
Returns a new instance of TeamReader.
18 19 20 |
# File 'lib/sportdb/readers/team.rb', line 18 def initialize( include_path, opts = {} ) @include_path = include_path end |
Instance Attribute Details
#include_path ⇒ Object (readonly)
Returns the value of attribute include_path.
15 16 17 |
# File 'lib/sportdb/readers/team.rb', line 15 def include_path @include_path end |
Instance Method Details
#read(name, more_attribs = {}) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/sportdb/readers/team.rb', line 23 def read( name, more_attribs={} ) reader = ValuesReaderV2.new( name, include_path, more_attribs ) reader.each_line do |new_attributes, values| Team.create_or_update_from_values( new_attributes, values ) end # each lines end |