Exception: Ruber::World::ProjectFactory::MismatchingNameError
- Inherits:
-
StandardError
- Object
- StandardError
- Ruber::World::ProjectFactory::MismatchingNameError
- Defined in:
- lib/ruber/world/project_factory.rb
Overview
Exception raised when the name requested for a project file is different for the name contained in the project itself
Instance Attribute Summary collapse
-
#actual_name ⇒ String
readonly
The project name contained in the project file.
-
#file ⇒ String
readonly
The project file.
-
#requested_name ⇒ String
readonly
The requested project name.
Instance Method Summary collapse
-
#initialize(file, requested_name, actual_name) ⇒ MismatchingNameError
constructor
A new instance of MismatchingNameError.
Constructor Details
#initialize(file, requested_name, actual_name) ⇒ MismatchingNameError
Returns a new instance of MismatchingNameError.
61 62 63 64 65 66 |
# File 'lib/ruber/world/project_factory.rb', line 61 def initialize file, requested_name, actual_name @file = file @requested_name = requested_name @actual_name = actual_name super "A project associated with #{file} exists, but the corresponding project name is #{actual_name} instead of #{requested_name}" end |
Instance Attribute Details
#actual_name ⇒ String (readonly)
Returns the project name contained in the project file.
54 55 56 |
# File 'lib/ruber/world/project_factory.rb', line 54 def actual_name @actual_name end |
#file ⇒ String (readonly)
Returns the project file.
44 45 46 |
# File 'lib/ruber/world/project_factory.rb', line 44 def file @file end |
#requested_name ⇒ String (readonly)
Returns the requested project name.
49 50 51 |
# File 'lib/ruber/world/project_factory.rb', line 49 def requested_name @requested_name end |