Exception: Bolt::Inventory::ValidationError
- Defined in:
- lib/bolt/inventory.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
Attributes inherited from Error
#error_code, #issue_code, #kind
Instance Method Summary collapse
- #add_parent(parent_group) ⇒ Object
- #details ⇒ Object
-
#initialize(message, offending_group) ⇒ ValidationError
constructor
A new instance of ValidationError.
- #message ⇒ Object
Methods inherited from Error
#add_filelineno, #msg, #to_h, #to_json, #to_puppet_error, unknown_plan, unknown_task
Constructor Details
#initialize(message, offending_group) ⇒ ValidationError
Returns a new instance of ValidationError.
23 24 25 26 27 |
# File 'lib/bolt/inventory.rb', line 23 def initialize(, offending_group) super(, 'bolt.inventory/validation-error') @_message = @path = [offending_group].compact end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
21 22 23 |
# File 'lib/bolt/inventory.rb', line 21 def path @path end |
Instance Method Details
#add_parent(parent_group) ⇒ Object
33 34 35 |
# File 'lib/bolt/inventory.rb', line 33 def add_parent(parent_group) @path << parent_group end |
#details ⇒ Object
29 30 31 |
# File 'lib/bolt/inventory.rb', line 29 def details { 'path' => path } end |
#message ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/bolt/inventory.rb', line 37 def if path.empty? @_message else "#{@_message} for group at #{path}" end end |