Class: Blogit::Archive::Year
- Inherits:
-
Object
- Object
- Blogit::Archive::Year
- Defined in:
- lib/blogit/archive/year.rb
Instance Attribute Summary collapse
-
#months ⇒ Object
Returns the value of attribute months.
-
#year ⇒ Object
Returns the value of attribute year.
Instance Method Summary collapse
-
#initialize(year, archiveables) ⇒ Year
constructor
A new instance of Year.
-
#to_partial_path ⇒ Object
The name of the partial to load for a Year object.
- #to_s ⇒ Object
Constructor Details
#initialize(year, archiveables) ⇒ Year
Returns a new instance of Year.
7 8 9 10 |
# File 'lib/blogit/archive/year.rb', line 7 def initialize(year, archiveables) @year = year @months = create_months_from_archiveables(archiveables) end |
Instance Attribute Details
#months ⇒ Object
Returns the value of attribute months.
5 6 7 |
# File 'lib/blogit/archive/year.rb', line 5 def months @months end |
#year ⇒ Object
Returns the value of attribute year.
5 6 7 |
# File 'lib/blogit/archive/year.rb', line 5 def year @year end |
Instance Method Details
#to_partial_path ⇒ Object
The name of the partial to load for a Blogit::Archive::Year object
Returns a String
19 20 21 |
# File 'lib/blogit/archive/year.rb', line 19 def to_partial_path self.class.name.underscore end |
#to_s ⇒ Object
12 13 14 |
# File 'lib/blogit/archive/year.rb', line 12 def to_s year end |