Sha256: 5a31067092feaca5374dadd308095f0e93c7adaaf5d5551a2b7c2cf413e0a35a
Contents?: true
Size: 852 Bytes
Versions: 15
Compression:
Stored size: 852 Bytes
Contents
require 'ardm/property/object' module Ardm class Property class String < Object load_as ::String dump_as ::String coercion_method :to_string accept_options :length DEFAULT_LENGTH = 50 length(DEFAULT_LENGTH) # Returns maximum property length (if applicable). # This usually only makes sense when property is of # type Range or custom # # @return [Integer, nil] # the maximum length of this property # # @api semipublic def length if @length.kind_of?(Range) @length.max else @length end end protected def initialize(model, name, options = {}) super @length = @options.fetch(:length) end end # class String end # class Property end # module Ardm
Version data entries
15 entries across 15 versions & 1 rubygems