Exception: Machinist::BlueprintCantSaveError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/machinist/exceptions.rb

Overview

Raised when make! is called on a class whose blueprints don’t support saving.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(blueprint) ⇒ BlueprintCantSaveError

Returns a new instance of BlueprintCantSaveError.



7
8
9
# File 'lib/machinist/exceptions.rb', line 7

def initialize(blueprint)
  @blueprint = blueprint
end

Instance Attribute Details

#blueprintObject (readonly)

Returns the value of attribute blueprint.



5
6
7
# File 'lib/machinist/exceptions.rb', line 5

def blueprint
  @blueprint
end

Instance Method Details

#messageObject



11
12
13
# File 'lib/machinist/exceptions.rb', line 11

def message
  "make! is not supported by blueprints for class #{@blueprint.klass.name}"
end