Sha256: 945c271ddb41e3fb2a563622f7af9c0e9721f0c7ba4ac3db6b0799ae7c67e50a

Contents?: true

Size: 485 Bytes

Versions: 10

Compression:

Stored size: 485 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 Representable::Coercion
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
roar-0.12.9 lib/roar/representer/feature/coercion.rb
roar-0.12.8 lib/roar/representer/feature/coercion.rb
roar-0.12.7 lib/roar/representer/feature/coercion.rb
roar-0.12.6 lib/roar/representer/feature/coercion.rb
roar-0.12.5 lib/roar/representer/feature/coercion.rb
roar-0.12.4 lib/roar/representer/feature/coercion.rb
roar-0.12.3 lib/roar/representer/feature/coercion.rb
roar-0.12.2 lib/roar/representer/feature/coercion.rb
roar-0.12.1 lib/roar/representer/feature/coercion.rb
roar-0.12.0 lib/roar/representer/feature/coercion.rb