Module: Roar::Coercion

Defined in:
lib/roar/coercion.rb

Overview

Use the :type option to specify the conversion type. class ImmigrantSong

include Roar::JSON
include Roar::Coercion

property :composed_at, :type => DateTime, :default => "May 12th, 2012"

end

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



16
17
18
19
20
# File 'lib/roar/coercion.rb', line 16

def self.included(base)
  base.class_eval do
    include Representable::Coercion
  end
end