Exception: OsCtld::DeviceDescendantRequiresMode

Inherits:
StandardError
  • Object
show all
Defined in:
lib/osctld/exceptions.rb

Instance Method Summary collapse

Constructor Details

#initialize(entity, mode) ⇒ DeviceDescendantRequiresMode

Returns a new instance of DeviceDescendantRequiresMode

Parameters:



35
36
37
38
39
40
41
42
# File 'lib/osctld/exceptions.rb', line 35

def initialize(entity, mode)
  if entity.is_a?(Group)
    super("child group '#{entity.name}' requires broader device access mode '#{mode}'")

  elsif entity.is_a?(Container)
    super("container '#{entity.id}' requires broader device access mode '#{mode}'")
  end
end