Class: Writetheman::Blog
- Inherits:
-
Object
- Object
- Writetheman::Blog
- Includes:
- Path
- Defined in:
- lib/writetheman/blog.rb
Instance Attribute Summary
Attributes included from Path
Instance Method Summary collapse
-
#initialize(path_application) ⇒ Blog
constructor
A new instance of Blog.
- #list_articles ⇒ Object
- #new_article(filename = '') ⇒ Object
Constructor Details
#initialize(path_application) ⇒ Blog
Returns a new instance of Blog.
6 7 8 |
# File 'lib/writetheman/blog.rb', line 6 def initialize(path_application) @path_application = path_application end |
Instance Method Details
#list_articles ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/writetheman/blog.rb', line 16 def list_articles articles = [] list_source_files.each do |filepath| articles << new_article(Pathname.new(filepath).basename.to_s) end articles end |