Module: Roar::Representer::Feature::Coercion
- Defined in:
- lib/roar/representer/feature/coercion.rb
Overview
Use the :type
option to specify the conversion type. class ImmigrantSong
include Roar::Representer::JSON
include Roar::Representer::Feature::Coercion
property :composed_at, :type => DateTime, :default => "May 12th, 2012"
end
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
13 14 15 16 17 |
# File 'lib/roar/representer/feature/coercion.rb', line 13 def self.included(base) base.class_eval do include Representable::Coercion end end |