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

- (Year) initialize(year, archiveables)

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

- (Object) months

Returns the value of attribute months


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

def months
  @months
end

- (Object) year

Returns the value of attribute year


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

def year
  @year
end

Instance Method Details

- (Object) to_partial_path

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

- (Object) to_s


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

def to_s
  year
end