Class: Rollin::YearArchive
- Inherits:
-
Object
- Object
- Rollin::YearArchive
- Defined in:
- lib/rollin/year_archive.rb
Instance Attribute Summary collapse
-
#monthly_archive ⇒ Object
readonly
Returns the value of attribute monthly_archive.
-
#year ⇒ Object
readonly
Returns the value of attribute year.
Instance Method Summary collapse
- #articles ⇒ Object
-
#initialize(year, monthly_archive) ⇒ YearArchive
constructor
A new instance of YearArchive.
Constructor Details
#initialize(year, monthly_archive) ⇒ YearArchive
Returns a new instance of YearArchive.
4 5 6 |
# File 'lib/rollin/year_archive.rb', line 4 def initialize(year, monthly_archive) @year, @monthly_archive = year, monthly_archive end |
Instance Attribute Details
#monthly_archive ⇒ Object (readonly)
Returns the value of attribute monthly_archive.
2 3 4 |
# File 'lib/rollin/year_archive.rb', line 2 def monthly_archive @monthly_archive end |
#year ⇒ Object (readonly)
Returns the value of attribute year.
2 3 4 |
# File 'lib/rollin/year_archive.rb', line 2 def year @year end |
Instance Method Details
#articles ⇒ Object
8 9 10 |
# File 'lib/rollin/year_archive.rb', line 8 def articles monthly_archive.map { |month_archive| month_archive.articles }.flatten end |