class Parade::Metadata::HTMLId

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

Public Instance Methods

apply(term,hash) click to toggle source
# File lib/parade/metadata/html_id.rb, line 21
def apply(term,hash)
  hash[:id] = parse(term)
  hash
end
match?(term) click to toggle source
# File lib/parade/metadata/html_id.rb, line 17
def match?(term)
  term =~ /#.+/
end

Private Instance Methods

parse(term) click to toggle source
# File lib/parade/metadata/html_id.rb, line 28
def parse(term)
  term[1..-1]
end