Class: Rsssf::Schedule

Inherits:
Object
  • Object
show all
Defined in:
lib/rsssf/schedule.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#roundsObject

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