class AnnualPlanner
file: annual_planner.rb
Attributes
to_s[R]
Public Class Methods
new(s=nil)
click to toggle source
# File lib/annual_planner.rb, line 10 def initialize(s=nil) if s then # open the file else # create a new file @filename = 'annual_planner.txt' end end
Public Instance Methods
save(filename=@filename)
click to toggle source
# File lib/annual_planner.rb, line 25 def save(filename=@filename) @filename = filename if filename File.write @filename, self.to_s end