Exception: ActiveData::TypecasterMissing

Inherits:
NoMethodError
  • Object
show all
Defined in:
lib/active_data/errors.rb

Instance Method Summary collapse

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