Class: MetaTags::Store
- Inherits:
-
Object
- Object
- MetaTags::Store
- Defined in:
- lib/meta_tags/store.rb
Constant Summary collapse
- TAGS =
:title, :description, :image, :url, :site_name, :keywords, :type, :site, :card, :charset
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#defaults ⇒ Object
readonly
Returns the value of attribute defaults.
Instance Method Summary collapse
- #charset ⇒ Object
-
#initialize(controller) ⇒ Store
constructor
A new instance of Store.
Constructor Details
#initialize(controller) ⇒ Store
Returns a new instance of Store.
10 11 12 13 14 15 16 17 18 |
# File 'lib/meta_tags/store.rb', line 10 def initialize(controller) @controller = controller @defaults = if MetaTags.defaults controller.instance_exec(&MetaTags.defaults) else {} end end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
3 4 5 |
# File 'lib/meta_tags/store.rb', line 3 def controller @controller end |
#defaults ⇒ Object (readonly)
Returns the value of attribute defaults.
3 4 5 |
# File 'lib/meta_tags/store.rb', line 3 def defaults @defaults end |
Instance Method Details
#charset ⇒ Object
20 21 22 |
# File 'lib/meta_tags/store.rb', line 20 def charset @charset ||= 'utf-8' end |