Class: Whatsnew::NewsFile
- Inherits:
-
Object
- Object
- Whatsnew::NewsFile
- Defined in:
- lib/whatsnew/news_file.rb
Instance Method Summary collapse
- #content ⇒ Object
- #file_name ⇒ Object
- #file_url ⇒ Object
-
#initialize(news) ⇒ NewsFile
constructor
A new instance of NewsFile.
- #read ⇒ Object
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
#content ⇒ Object
15 16 17 |
# File 'lib/whatsnew/news_file.rb', line 15 def content "See #{file_url}." end |
#file_name ⇒ Object
7 8 9 |
# File 'lib/whatsnew/news_file.rb', line 7 def file_name news.name end |
#file_url ⇒ Object
11 12 13 |
# File 'lib/whatsnew/news_file.rb', line 11 def file_url news_html_url end |
#read ⇒ Object
19 20 21 |
# File 'lib/whatsnew/news_file.rb', line 19 def read "What's New:\n" "See #{file_name}: #{file_url}." end |