Sha256: a52055885e301ff8b85d0a70b39ff9d8a7224e333af7904e31ecab00b030afc7
Contents?: true
Size: 630 Bytes
Versions: 9
Compression:
Stored size: 630 Bytes
Contents
module Parade class Metadata # # Specify the HTML id of the slide through this metadata parser. This allows # the id to be defined like one would reference with jQuery. # # @example Setting the Metadata id # # metadata = Metadata.parse "transition=fade one two #id three tpl=template_name" # metadata.id # => id # # @see Metadata # class HTMLId def match?(term) term =~ /#.+/ end def apply(term,hash) hash[:id] = parse(term) hash end private def parse(term) term[1..-1] end end end end
Version data entries
9 entries across 9 versions & 1 rubygems