Sha256: a8352ba13c28bfdc8b206831f84ccc74840c43d47831c8dc2f63f414dca1e381
Contents?: true
Size: 521 Bytes
Versions: 15
Compression:
Stored size: 521 Bytes
Contents
require 'virtus' require 'representable/coercion' module Roar::Representer::Feature # 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 module Coercion def self.included(base) base.class_eval do include Virtus extend Representable::Coercion::ClassMethods end end end end
Version data entries
15 entries across 15 versions & 1 rubygems