lib/sportdb/formats/structs/match.rb in sportdb-formats-0.3.0 vs lib/sportdb/formats/structs/match.rb in sportdb-formats-0.4.0
- old
+ new
@@ -1,10 +1,7 @@
# encoding: utf-8
-##
-# note: add all "former" structs to the SportDb::Import module / namespace
-
module SportDb
module Import
class Match
@@ -14,12 +11,15 @@
end
def update( **kwargs )
## note: check with has_key? because value might be nil!!!
@date = kwargs[:date] if kwargs.has_key? :date
+
+ ## todo/fix: use team1_name, team2_name or similar - for compat with db activerecord version? why? why not?
@team1 = kwargs[:team1] if kwargs.has_key? :team1
@team2 = kwargs[:team2] if kwargs.has_key? :team2
+
@conf1 = kwargs[:conf1] if kwargs.has_key? :conf1
@conf2 = kwargs[:conf2] if kwargs.has_key? :conf2
@country1 = kwargs[:country1] if kwargs.has_key? :country1
@country2 = kwargs[:country2] if kwargs.has_key? :country2
@@ -122,10 +122,9 @@
end
def scorei_str # pretty print (half time) scores; convenience method
"#{@score1i}-#{@score2i}"
end
-
end # class Match
-end # module Import
+end # module Import
end # module SportDb