lib/sportdb/formats/structs/match.rb in sportdb-formats-1.1.0 vs lib/sportdb/formats/structs/match.rb in sportdb-formats-1.1.1
- old
+ new
@@ -18,11 +18,12 @@
:leg, ## e.g. '1','2','3','replay', etc. - use leg for marking **replay** too - keep/make leg numeric?! - why? why not?
:stage,
:group,
:conf1, :conf2, ## special case for mls e.g. conference1, conference2 (e.g. west, east, central)
:country1, :country2, ## special case for champions league etc. - uses FIFA country code
- :comments
+ :comments,
+ :league ## (optinal) added as text for now (use struct?)
def initialize( **kwargs )
update( kwargs ) unless kwargs.empty?
end
@@ -44,9 +45,12 @@
@round = kwargs[:round] if kwargs.has_key? :round
@stage = kwargs[:stage] if kwargs.has_key? :stage
@leg = kwargs[:leg] if kwargs.has_key? :leg
@group = kwargs[:group] if kwargs.has_key? :group
@comments = kwargs[:comments] if kwargs.has_key? :comments
+
+ @league = kwargs[:league] if kwargs.has_key? :league
+
if kwargs.has_key?( :score ) ## check all-in-one score struct for convenience!!!
score = kwargs[:score]
if score.nil? ## reset all score attribs to nil!!
@score1 = nil