Class: Whatsnew::LocalFiles

Inherits:
Object
  • Object
show all
Defined in:
lib/whatsnew/local_files.rb

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ LocalFiles

Returns a new instance of LocalFiles.



3
4
5
# File 'lib/whatsnew/local_files.rb', line 3

def initialize(path)
  @path = path || DOT
end

Instance Method Details

#to_news_fileObject



7
8
9
10
11
12
13
# File 'lib/whatsnew/local_files.rb', line 7

def to_news_file
  if news = find_news_at_local
    LocalNewsFile.new(news, path)
  else
    NoNewsFile.new
  end
end