Sha256: 2c3e285ea18d15a8b78c9ff84a85a417fb44d78280659ec3491b47e26008137d
Contents?: true
Size: 655 Bytes
Versions: 6
Compression:
Stored size: 655 Bytes
Contents
# encoding: UTF-8 module Spontaneous::Field class Tags < Base # Just use the standard String editor for now. # TODO: This should be replaced with a tags specific one asap. has_editor "Spontaneous.Field.String" include Enumerable def outputs [:html, :tags] end def generate_html(value, site) value end TAG_PARSER_RE = /"([^"]+)"|([^ ]+)/ def generate_tags(value, site) return [] if value.blank? (value).scan(TAG_PARSER_RE).flatten.compact end def taglist values[:tags] || [] end def each(&block) taglist.each(&block) end self.register end end
Version data entries
6 entries across 6 versions & 1 rubygems