Class: CastingAttributes::TypeCaster::String

Inherits:
Base
  • Object
show all
Defined in:
lib/casting_attributes/type_caster/string.rb

Instance Attribute Summary

Attributes inherited from Base

#attribute, #model

Instance Method Summary collapse

Methods inherited from Base

#initialize, #readers, #storage_var, #writers

Constructor Details

This class inherits a constructor from CastingAttributes::TypeCaster::Base

Instance Method Details

#typecast(value) ⇒ Object



5
6
7
# File 'lib/casting_attributes/type_caster/string.rb', line 5

def typecast(value)
  value.to_s
end