Class: Writecast::Month_index
- Inherits:
-
Object
- Object
- Writecast::Month_index
- Defined in:
- lib/writecast/models.rb
Instance Method Summary collapse
-
#initialize(year, month, month_posts) ⇒ Month_index
constructor
A new instance of Month_index.
- #to_html(pages) ⇒ Object
Constructor Details
#initialize(year, month, month_posts) ⇒ Month_index
Returns a new instance of Month_index.
166 167 168 169 170 |
# File 'lib/writecast/models.rb', line 166 def initialize(year, month, month_posts) @year = year @month = month @month_posts = month_posts end |
Instance Method Details
#to_html(pages) ⇒ Object
172 173 174 175 176 177 178 |
# File 'lib/writecast/models.rb', line 172 def to_html(pages) title_tag = SITE_TITLE + SEPARATOR + @year.to_s + SEPARATOR + Date::MONTHNAMES[@month] Month_index_view.new(:doc => self, :year => @year, :month => @month, :posts => @month_posts, :pages => pages, :title_tag => title_tag ).to_html(:prettyprint => PRETTY_HTML) end |