Class: Blogit::Archive::Month
- Inherits:
-
Object
- Object
- Blogit::Archive::Month
- Defined in:
- lib/blogit/archive/month.rb
Overview
Used internally by List when creating a new archive list.
Instance Attribute Summary collapse
-
#archiveables ⇒ Object
readonly
Returns the value of attribute archiveables.
-
#month_name ⇒ Object
(also: #to_s)
readonly
Returns the value of attribute month_name.
Instance Method Summary collapse
-
#initialize(month_name, archiveables) ⇒ Month
constructor
Creates a new Month object.
-
#to_partial_path ⇒ Object
The name of the partial to load for a Month object.
Constructor Details
#initialize(month_name, archiveables) ⇒ Month
Creates a new Blogit::Archive::Month object
month_name - The name of the month for this collection of archiveables archiveables - A collection of archiveable objects
18 19 20 21 |
# File 'lib/blogit/archive/month.rb', line 18 def initialize(month_name, archiveables) @month_name = month_name @archiveables = archiveables end |
Instance Attribute Details
#archiveables ⇒ Object (readonly)
Returns the value of attribute archiveables.
11 12 13 |
# File 'lib/blogit/archive/month.rb', line 11 def archiveables @archiveables end |
#month_name ⇒ Object (readonly) Also known as: to_s
Returns the value of attribute month_name.
7 8 9 |
# File 'lib/blogit/archive/month.rb', line 7 def month_name @month_name end |
Instance Method Details
#to_partial_path ⇒ Object
The name of the partial to load for a Blogit::Archive::Month object
Returns a String
27 28 29 |
# File 'lib/blogit/archive/month.rb', line 27 def to_partial_path self.class.name.underscore end |