Exception: MotherBrain::ComponentNotVersioned

Inherits:
MBError
  • Object
show all
Defined in:
lib/mb/errors.rb

Constant Summary

Constants inherited from MBError

MBError::DEFAULT_EXIT_CODE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from MBError

#error_code, error_code, exit_code, #exit_code, #to_hash, #to_json, #to_s

Constructor Details

#initialize(component_name) ⇒ ComponentNotVersioned

Returns a new instance of ComponentNotVersioned.



392
393
394
# File 'lib/mb/errors.rb', line 392

def initialize(component_name)
  @component_name = component_name
end

Instance Attribute Details

#component_nameObject (readonly)

Returns the value of attribute component_name.



390
391
392
# File 'lib/mb/errors.rb', line 390

def component_name
  @component_name
end

Instance Method Details

#messageObject



396
397
398
399
400
401
402
403
# File 'lib/mb/errors.rb', line 396

def message
  [
    "Component '#{component_name}' is not versioned",
    "You can version components with:",
    "  versioned # defaults to \"#{component_name}.version\"",
    "  versioned_with \"custom.version.attribute\""
  ].join "\n"
end