module Rooftop::Coercions::ClassMethods

Public Instance Methods

coerce_field(*coercions) click to toggle source

@param coercion [Hash] the coercion to apply - key is the field, value is a lambda

# File lib/rooftop/coercions.rb, line 30
def coerce_field(*coercions)
  @coercions ||= {}
  coercions.each do |coercions_hash|
    @coercions.merge!(coercions_hash)
  end
  @coercions
end