class Metaa::TagCollection
Public Class Methods
new(tags = [])
click to toggle source
# File lib/metaa/tag_collection.rb, line 3 def initialize(tags = []) add(tags) end
Public Instance Methods
add(new_tags)
click to toggle source
# File lib/metaa/tag_collection.rb, line 15 def add(new_tags) new_tags = [new_tags] if !new_tags.is_a? Array new_tags.each do |tag| tag = Tag.new(tag) if !tag.is_a?(Tag) tags << tag end end
empty?()
click to toggle source
# File lib/metaa/tag_collection.rb, line 11 def empty? tags.empty? end
to_html()
click to toggle source
# File lib/metaa/tag_collection.rb, line 23 def to_html tags.map(&:to_html).join.html_safe end