Module: SeoMeta::InstanceMethods
- Defined in:
- lib/seo_meta/instance_methods.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/seo_meta/instance_methods.rb', line 5 def included(base) # This has to be introduced using module_eval because it overrides something. base.module_eval do def || end # Allow attributes supplied to override the current seo_meta_attributes. def attributes .merge(super) end def attributes_equals(attributes, *args) .merge(attributes) super end alias_method :attributes_equals, :attributes= end end |
Instance Method Details
#seo_meta_attributes ⇒ Object
27 28 29 30 31 |
# File 'lib/seo_meta/instance_methods.rb', line 27 def ::SeoMeta.attributes.keys.inject({}) { |attrs, name| attrs.merge(name.to_s => send(name)) } end |