Sha256: 368d65003b0ffde1ff44cf27c6aa35c79ece53136a3d3ee28542f78eb96cc344
Contents?: true
Size: 744 Bytes
Versions: 3
Compression:
Stored size: 744 Bytes
Contents
module Machinist # Raised when make! is called on a class whose blueprints don't support # saving. class BlueprintCantSaveError < RuntimeError attr_reader :blueprint def initialize(blueprint, message = nil) @blueprint = blueprint @message = message end def message @message ||= "make! is not supported by blueprints for class #{@blueprint.klass.name}" end end # Raised when calling make on a class with no corresponding blueprint # defined. class NoBlueprintError < RuntimeError attr_reader :klass, :name def initialize(klass, name) @klass = klass @name = name end def message "No #{@name} blueprint defined for class #{@klass.name}" end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
machinist_redux-3.0.4 | lib/machinist/exceptions.rb |
machinist_redux-3.0.3 | lib/machinist/exceptions.rb |
machinist_redux-3.0.2 | lib/machinist/exceptions.rb |