Class: Metaa::Meta
- Inherits:
-
Object
- Object
- Metaa::Meta
- Defined in:
- lib/metaa/meta.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
- #definitions ⇒ Object
- #html ⇒ Object
-
#initialize(object = nil) ⇒ Meta
constructor
A new instance of Meta.
- #meta(attributes = {}) ⇒ Object
-
#tags ⇒ Object
lazy define meta tags then collect.
Constructor Details
#initialize(object = nil) ⇒ Meta
Returns a new instance of Meta.
5 6 7 |
# File 'lib/metaa/meta.rb', line 5 def initialize(object = nil) @object = object end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
3 4 5 |
# File 'lib/metaa/meta.rb', line 3 def object @object end |
Instance Method Details
#definitions ⇒ Object
13 14 15 |
# File 'lib/metaa/meta.rb', line 13 def definitions @definitions ||= [] end |
#html ⇒ Object
25 26 27 |
# File 'lib/metaa/meta.rb', line 25 def html .map(&:html).join.html_safe end |
#meta(attributes = {}) ⇒ Object
9 10 11 |
# File 'lib/metaa/meta.rb', line 9 def (attributes = {}) definitions << Definition.new(attributes) end |
#tags ⇒ Object
lazy define meta tags then collect
18 19 20 21 22 23 |
# File 'lib/metaa/meta.rb', line 18 def @tags ||= begin end end |