Sha256: 87160d3de28194ec15ef09e80fc3bc9f640f8e77e67085cf8d3974ca791fb6cc
Contents?: true
Size: 583 Bytes
Versions: 1
Compression:
Stored size: 583 Bytes
Contents
lib = File.dirname __FILE__ Dir[File.join(lib, "models/**/*.rb")].each { |file| require file } module Hexx # Declares the +.attr_coerced+ private class method. # # @example # # require "hexx" # require_relative "attributes/string" # # class User # extend Hexx::Models # attr_coerced :name, type: ActiveSupport::Multibyte::Chars # end # module Models private def attr_coerced(*names, type:) names.each { |name| coercer.new(self, name, type).coerce } end def coercer @coercer ||= BaseCoercer end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hexx-2.0.1 | lib/hexx/models.rb |