class Parade::Metadata::Template

The Template metadata allows the specification of a template to use for the slide. This is extremely similar to the {Assignment} parser, except it allows for the previously supported abbreviation tpl for representing template.

Public Instance Methods

apply(term,hash) click to toggle source
# File lib/parade/metadata/template.rb, line 16
def apply(term,hash)
  hash[:template] = parse(term)
  hash
end
match?(term) click to toggle source
# File lib/parade/metadata/template.rb, line 12
def match?(term)
  term =~ /^(?:tpl|template)=(.+)$/
end

Private Instance Methods

parse(term) click to toggle source
# File lib/parade/metadata/template.rb, line 23
def parse(term)
  term =~ /^(?:tpl|template)=(.+)$/
  template_name = Regexp.last_match(1)
end