Exception: MotherBrain::RequiredFileNotFound
- Defined in:
- lib/mb/errors.rb
Direct Known Subclasses
Constant Summary
Constants inherited from MBError
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#required_for ⇒ Object
readonly
Returns the value of attribute required_for.
Instance Method Summary collapse
-
#initialize(filename, options = {}) ⇒ RequiredFileNotFound
constructor
A new instance of RequiredFileNotFound.
- #message ⇒ Object
Methods inherited from MBError
#error_code, error_code, exit_code, #exit_code, #to_hash, #to_json, #to_s
Constructor Details
#initialize(filename, options = {}) ⇒ RequiredFileNotFound
Returns a new instance of RequiredFileNotFound.
440 441 442 443 |
# File 'lib/mb/errors.rb', line 440 def initialize(filename, = {}) @filename = filename @required_for = [:required_for] end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
437 438 439 |
# File 'lib/mb/errors.rb', line 437 def filename @filename end |
#required_for ⇒ Object (readonly)
Returns the value of attribute required_for.
438 439 440 |
# File 'lib/mb/errors.rb', line 438 def required_for @required_for end |
Instance Method Details
#message ⇒ Object
445 446 447 448 449 450 |
# File 'lib/mb/errors.rb', line 445 def msg = "#{@filename} does not exist, but is required" msg += " for #{@required_for}" if @required_for msg += "." msg end |