Exception: ActiveData::TypecasterMissing
- Inherits:
-
NoMethodError
- Object
- NoMethodError
- ActiveData::TypecasterMissing
- Defined in:
- lib/active_data/errors.rb
Instance Method Summary collapse
-
#initialize(*classes) ⇒ TypecasterMissing
constructor
A new instance of TypecasterMissing.
Constructor Details
#initialize(*classes) ⇒ TypecasterMissing
Returns a new instance of TypecasterMissing.
82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/active_data/errors.rb', line 82 def initialize(*classes) classes = classes.flatten super <<-MESSAGE Could not find typecaster for #{classes} You can define it with: ActiveData.typecaster('#{classes.first}') do |value| # do some staff with value and options end MESSAGE end |