Sha256: a6fdbd822306ca10678c03651825c0c8440ceb376eff54c15a62f13baaf6632d

Contents?: true

Size: 636 Bytes

Versions: 9

Compression:

Stored size: 636 Bytes

Contents

module Parade
  class Metadata

    #
    # 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.
    # 
    class Template

      def match?(term)
        term =~ /^(?:tpl|template)=(.+)$/
      end

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

      private

      def parse(term)
        term =~ /^(?:tpl|template)=(.+)$/
        template_name = Regexp.last_match(1)
      end

    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
parade-0.10.2 lib/parade/metadata/template.rb
parade-0.10.1 lib/parade/metadata/template.rb
parade-0.10.0 lib/parade/metadata/template.rb
parade-0.9.2 lib/parade/metadata/template.rb
parade-0.9.1 lib/parade/metadata/template.rb
parade-0.9.0 lib/parade/metadata/template.rb
parade-0.8.2 lib/parade/metadata/template.rb
parade-0.8.1 lib/parade/metadata/template.rb
parade-0.8.0 lib/parade/metadata/template.rb