Noosfero/noosfero

View on GitHub
plugins/open_graph/lib/open_graph_plugin.rb

Summary

Maintainability
A
0 mins
Test Coverage
module OpenGraphPlugin
  extend Noosfero::Plugin::ParentMethods

  def self.plugin_name
    I18n.t "open_graph_plugin.lib.plugin.name"
  end

  def self.plugin_description
    I18n.t "open_graph_plugin.lib.plugin.description"
  end

  def self.context
    Thread.current[:open_graph_context] || :open_graph
  end

  def self.context=(value)
    Thread.current[:open_graph_context] = value
  end

  def self.debug?(actor = nil)
    !Rails.env.production?
  end
end