Sha256: fe594478b897bef65d772ae72d0974f4360e773b93b7ced9b3393b004d1bf3ed
Contents?: true
Size: 453 Bytes
Versions: 5
Compression:
Stored size: 453 Bytes
Contents
class UnknownArtisanTypeError < StandardError end module Covetous module Data class Artisan < Covetous::Shen ARTISAN_TYPES = %w{blacksmith jeweler} def initialize(artisan_type) raise UnknownArtisanTypeError, "Please only use an artisan type from: #{ARTISAN_TYPES.to_s}" unless ARTISAN_TYPES.include? artisan_type @url = "#{Covetous::Data::BASE_URL}/artisan/#{artisan_type}" super end end end end
Version data entries
5 entries across 5 versions & 1 rubygems