Exception: BitmaskEnum::BitmaskEnumMethodConflictError Private

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/bitmask_enum/errors.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Error for a conflicting method that would be generated by the enum

Instance Method Summary collapse

Constructor Details

#initialize(source, klass, attribute, method_name, klass_method) ⇒ BitmaskEnumMethodConflictError

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of BitmaskEnumMethodConflictError.



15
16
17
18
19
20
21
# File 'lib/bitmask_enum/errors.rb', line 15

def initialize(source, klass, attribute, method_name, klass_method)
  super(
    'BitmaskEnum method definition is conflicting: ' \
    "#{klass_method ? 'class ' : ''}method: #{method_name} " \
    "for enum: #{attribute} in class: #{klass} is already defined by: #{source}"
  )
end