Class: Metaa::Meta

Inherits:
Object
  • Object
show all
Defined in:
lib/metaa/meta.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#objectObject (readonly)

Returns the value of attribute object.



3
4
5
# File 'lib/metaa/meta.rb', line 3

def object
  @object
end

Instance Method Details

#define_metaObject



17
18
19
# File 'lib/metaa/meta.rb', line 17

def define_meta
  # do nothing
end

#meta(attributes = {}) ⇒ Object



13
14
15
# File 'lib/metaa/meta.rb', line 13

def meta(attributes = {})
  tag_collection.add(attributes)
end

#tag_collectionObject



9
10
11
# File 'lib/metaa/meta.rb', line 9

def tag_collection
  @tag_collection ||= TagCollection.new
end

#to_htmlObject



21
22
23
24
# File 'lib/metaa/meta.rb', line 21

def to_html
  define_meta if tag_collection.empty?
  tag_collection.to_html
end