lib/sportdb/formats/structs/round.rb in sportdb-formats-0.4.0 vs lib/sportdb/formats/structs/round.rb in sportdb-formats-1.0.0

- old
+ new

@@ -1,20 +1,30 @@ module SportDb module Import class Round - attr_reader :pos, :title + attr_reader :title, :start_date, :end_date, :knockout + attr_accessor :pos # note: make read & writable ## ## todo: change db schema ## make start and end date optional ## change pos to num - why? why not? ## make pos/num optional too ## ## sort round by scheduled/planed start date - def initialize( pos:, title: ) - @pos = pos - @title = title + def initialize( title:, + pos: nil, + start_date: nil, + end_date: nil, + knockout: false, + auto: true ) + @title = title + @pos = pos + @start_date = start_date + @end_date = end_date + @knockout = knockout + @auto = auto # auto-created (inline reference/header without proper definition before) end end # class Round end # module Import end # module SportDb