Sha256: f17d03dd3af40c881a87b50758d72a118dc6347889e059dbee1bdd75f40df049

Contents?: true

Size: 304 Bytes

Versions: 9

Compression:

Stored size: 304 Bytes

Contents

module Rooftop
  module Coercions
    module AuthorCoercion
      def self.included(base)
        base.send(:after_find, ->(r) { r.author.registered = DateTime.parse(r.author.registered)})
        base.send(:coerce_field, {author: ->(author) { Rooftop::Author.new(author) }})
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rooftop-0.1.4.1 lib/rooftop/coercions/author_coercion.rb
rooftop-0.1.4 lib/rooftop/coercions/author_coercion.rb
rooftop-0.1.3 lib/rooftop/coercions/author_coercion.rb
rooftop-0.1.2 lib/rooftop/coercions/author_coercion.rb
rooftop-0.1.1 lib/rooftop/coercions/author_coercion.rb
rooftop-0.0.7.4 lib/rooftop/coercions/author_coercion.rb
rooftop-0.0.6 lib/rooftop/coercions/author_coercion.rb
rooftop-0.0.5 lib/rooftop/coercions/author_coercion.rb
rooftop-0.0.3 lib/rooftop/coercions/author_coercion.rb