Class: Parade::Metadata::HTMLId

Inherits:
Object
  • Object
show all
Defined in:
lib/parade/metadata/html_id.rb

Overview

Specify the HTML id of the slide through this metadata parser. This allows the id to be defined like one would reference with jQuery.

Examples:

Setting the Metadata id


 = Metadata.parse "transition=fade one two #id three tpl=template_name"
.id # => id

See Also:

Instance Method Summary collapse

Instance Method Details

#apply(term, hash) ⇒ Object



21
22
23
24
# File 'lib/parade/metadata/html_id.rb', line 21

def apply(term,hash)
  hash[:id] = parse(term)
  hash
end

#match?(term) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/parade/metadata/html_id.rb', line 17

def match?(term)
  term =~ /#.+/
end