Exception: ShaAttribute::ShaAttributeTypeMismatchError

Inherits:
StandardError
  • Object
show all
Defined in:
app/models/concerns/sha_attribute.rb

Direct Known Subclasses

Sha256AttributeTypeMismatchError

Instance Method Summary collapse

Constructor Details

#initialize(column_name, column_type) ⇒ ShaAttributeTypeMismatchError

Returns a new instance of ShaAttributeTypeMismatchError.



7
8
9
10
# File 'app/models/concerns/sha_attribute.rb', line 7

def initialize(column_name, column_type)
  @column_name = column_name
  @column_type = column_type
end

Instance Method Details

#messageObject



12
13
14
# File 'app/models/concerns/sha_attribute.rb', line 12

def message
  "sha_attribute :#{@column_name} should be a :binary column but it is :#{@column_type}"
end