Class: Blogit::Archive::Month

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

Overview

Used internally by List when creating a new archive list.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Month) initialize(month_name, archiveables)

Creates a new Blogit::Archive::Month object

Parameters:

  • 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

- (Object) archiveables (readonly)

Returns the value of attribute archiveables


11
12
13
# File 'lib/blogit/archive/month.rb', line 11

def archiveables
  @archiveables
end

- (Object) month_name (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

- (Object) to_partial_path

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