Sha256: 10c2cfd52456e8eda5070c0a69b5cb5ea8009ef37df010ba04c9bf149155490f
Contents?: true
Size: 508 Bytes
Versions: 29
Compression:
Stored size: 508 Bytes
Contents
module Stitches class Error attr_reader :code, :message def initialize(options = {}) [:code, :message].each do |key| unless options.has_key?(key) raise MissingParameter.new(self.class,key) end end @code = options[:code] @message = options[:message] end class MissingParameter < StandardError def initialize(klass,param_name) super("#{ klass.name } must be initialized with :#{ param_name }") end end end end
Version data entries
29 entries across 29 versions & 1 rubygems