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.



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

def initialize(blueprint)
  @blueprint = blueprint
end

Instance Attribute Details

#blueprintObject (readonly)

Returns the value of attribute blueprint.



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

def blueprint
  @blueprint
end

Instance Method Details

#messageObject



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

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