Module: MetaTags::PageDataHelper

Included in:
Controller
Defined in:
lib/meta_tags/page_data_helper.rb

Instance Method Summary collapse

Instance Method Details

#process_meta_tag(tag) ⇒ Object



10
11
12
13
14
# File 'lib/meta_tags/page_data_helper.rb', line 10

def process_meta_tag tag
  if (processor = processors[tag])
    processor.new(self).process!
  end
end

#processorsObject



16
17
18
19
20
21
# File 'lib/meta_tags/page_data_helper.rb', line 16

def processors
  @processors ||= %w(title description image keywords url).reduce({}) do |hash, tag|
    hash[tag] = MetaTags::Tags.const_get(tag.camelize)
    hash
  end
end