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
#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.
10 11 12 13 14 |
# File 'lib/bolt/inventory.rb', line 10 def initialize(, offending_group) super(msg, 'bolt.inventory/validation-error') @_message = @path = offending_group ? [offending_group] : [] end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
9 10 11 |
# File 'lib/bolt/inventory.rb', line 9 def path @path end |
Instance Method Details
#add_parent(parent_group) ⇒ Object
20 21 22 |
# File 'lib/bolt/inventory.rb', line 20 def add_parent(parent_group) @path << parent_group end |
#details ⇒ Object
16 17 18 |
# File 'lib/bolt/inventory.rb', line 16 def details { 'path' => path } end |
#message ⇒ Object
24 25 26 |
# File 'lib/bolt/inventory.rb', line 24 def "#{@_message} for group at #{path}" end |