Class: Blogit::Archive::Year

Inherits:
Object
  • Object
show all
Defined in:
lib/blogit/archive/year.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#monthsObject

Returns the value of attribute months.



5
6
7
# File 'lib/blogit/archive/year.rb', line 5

def months
  @months
end

#yearObject

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_pathObject

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_sObject



12
13
14
# File 'lib/blogit/archive/year.rb', line 12

def to_s
  year
end