Class: Rsssf::Schedule
- Inherits:
-
Object
- Object
- Rsssf::Schedule
- Defined in:
- lib/rsssf/schedule.rb
Instance Attribute Summary collapse
-
#rounds ⇒ Object
track no of rounds.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(txt) ⇒ Schedule
constructor
A new instance of Schedule.
- #save(path) ⇒ Object
Constructor Details
#initialize(txt) ⇒ Schedule
Returns a new instance of Schedule.
13 14 15 16 17 |
# File 'lib/rsssf/schedule.rb', line 13 def initialize( txt ) @txt = txt @rounds = nil # undefined end |
Instance Attribute Details
#rounds ⇒ Object
track no of rounds
11 12 13 |
# File 'lib/rsssf/schedule.rb', line 11 def rounds @rounds end |
Class Method Details
.from_string(txt) ⇒ Object
7 8 9 |
# File 'lib/rsssf/schedule.rb', line 7 def self.from_string( txt ) self.new( txt ) end |
Instance Method Details
#save(path) ⇒ Object
20 21 22 23 24 |
# File 'lib/rsssf/schedule.rb', line 20 def save( path ) File.open( path, 'w' ) do |f| f.write @txt end end |