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.



375
376
377
# File 'lib/mb/errors.rb', line 375

def initialize(component_name)
  @component_name = component_name
end

Instance Attribute Details

#component_nameObject (readonly)

Returns the value of attribute component_name.



373
374
375
# File 'lib/mb/errors.rb', line 373

def component_name
  @component_name
end

Instance Method Details

#messageObject



379
380
381
382
383
384
385
386
# File 'lib/mb/errors.rb', line 379

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