Class: Whatsnew::NewsFile

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

Instance Method Summary collapse

Constructor Details

#initialize(news) ⇒ NewsFile

Returns a new instance of NewsFile.



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

def initialize(news)
  @news = news
end

Instance Method Details

#contentObject



15
16
17
# File 'lib/whatsnew/news_file.rb', line 15

def content
  "See #{file_url}."
end

#file_nameObject



7
8
9
# File 'lib/whatsnew/news_file.rb', line 7

def file_name
  news.name
end

#file_urlObject



11
12
13
# File 'lib/whatsnew/news_file.rb', line 11

def file_url
  news_html_url
end

#readObject



19
20
21
# File 'lib/whatsnew/news_file.rb', line 19

def read
  "What's New:\n" "See #{file_name}: #{file_url}."
end