Class: TotoBongo::Archives
- Includes:
- Template
- Defined in:
- lib/toto-bongo.rb
Instance Method Summary collapse
- #[](a) ⇒ Object
-
#initialize(articles, config) ⇒ Archives
constructor
A new instance of Archives.
- #to_html ⇒ Object (also: #to_s)
Methods included from Template
included, #markdown, #method_missing
Constructor Details
#initialize(articles, config) ⇒ Archives
320 321 322 323 324 |
# File 'lib/toto-bongo.rb', line 320 def initialize articles, config TotoBongo::logger.debug("Archives::initialize") self.replace articles @config = config end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class TotoBongo::Template
Instance Method Details
#[](a) ⇒ Object
326 327 328 329 |
# File 'lib/toto-bongo.rb', line 326 def [] a TotoBongo::logger.debug("Archives::[]: a = #{a}") a.is_a?(Range) ? self.class.new(self.slice(a) || [], @config) : super end |
#to_html ⇒ Object Also known as: to_s
331 332 333 334 |
# File 'lib/toto-bongo.rb', line 331 def to_html TotoBongo::logger.debug("Archives::to_html") super(:archives, @config) end |