module Rooftop::Coercions::AuthorCoercion

Public Class Methods

included(base) click to toggle source
# File lib/rooftop/coercions/author_coercion.rb, line 4
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