lib/fbo/file.rb in fbo-0.0.1 vs lib/fbo/file.rb in fbo-0.0.2

- old
+ new

@@ -3,10 +3,17 @@ module FBO class File extend Forwardable attr_reader :file - def_delegators :@file, :open, :readline, :read + def_delegators :@file, :open, :readline, :read, :path, :to_path + + class << self + def filename_for_date(date) + raise ArgumentError, "No date given for file" unless date + "FBOFeed#{ date.strftime("%Y%m%d") }" + end + end def initialize(filename) @file = ::File.new(filename) end end