Method: Granite::Represents::Attribute#typecaster
- Defined in:
- lib/granite/represents/attribute.rb
#typecaster ⇒ Object
29 30 31 32 33 34 |
# File 'lib/granite/represents/attribute.rb', line 29 def typecaster @typecaster ||= begin type_class = type.instance_of?(Class) ? type : type.class @typecaster = ActiveData.typecaster(type_class.ancestors.grep(Class)) end end |