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


14
15
16
17
18
# File 'lib/roar/coercion.rb', line 14

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