Sha256: 752a4564e50eea5036a8b38c8a13072271a2a203aaa71869c1c1561850e12395

Contents?: true

Size: 282 Bytes

Versions: 1

Compression:

Stored size: 282 Bytes

Contents

class Wordsmith::TemplateCollection

  def initialize(templates)
    @templates = templates
  end

  def find(slug)
    template = @templates.find {|t| t.slug == slug }
    template || raise(%Q(Template not found with slug: "#{slug}"))
  end

  def all
    @templates.dup
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wordsmith-ruby-sdk-2.0.0 lib/wordsmith/template_collection.rb