Class: TD2Planet::DefaultFormatter

Inherits:
Formatter
  • Object
show all
Defined in:
lib/td2planet/default_formatter.rb

Constant Summary

Constants inherited from Formatter

Formatter::ERB_METHODS, Formatter::TukkomiLinkRe

Instance Method Summary collapse

Methods inherited from Formatter

#date_format, def_erb_method, #default_templates_dir, #hk, #k, #move_tukkomi_link, #relative_path_to_absolute_uri, #sanchor_format, #tag_attr_relative_path_to_absolute_uri, #to_author, #to_categories, #to_html, #to_rss, #to_sanchor, #to_section_body, #too_old?

Constructor Details

#initialize(config) ⇒ DefaultFormatter

Returns a new instance of DefaultFormatter.



10
11
12
13
14
15
# File 'lib/td2planet/default_formatter.rb', line 10

def initialize(config)
  super
  unless @config.key?('filter')
    @config['filter'] = 'true'
  end
end

Instance Method Details

#skip?(item) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/td2planet/default_formatter.rb', line 17

def skip?(item)
  eval(@config['filter']) or too_old?(item)
end