Sha256: f14ef4c7be714592b7da583a8dc576f4d6b634558f27347a0ece54e5219e4cdf
Contents?: true
Size: 944 Bytes
Versions: 3
Compression:
Stored size: 944 Bytes
Contents
#encoding: utf-8 module Vanguard class Rule class Nullary class Attribute # Rule that tests inputs against formats class Format < self TYPE = :invalid # Builder for format rule class Builder < Builder::Nullary REQUIRED_OPTIONS = [:format].freeze private # Return rule for attribute name # # @return [Rule] # # @api private # def rule(name) klass.new(name, matcher) end # Return format matcher # # @return [Matcher::Format] # # @api private # def matcher Matcher::Nullary::Format.build(options.fetch(:format)) end memoize :matcher end register :validates_format_of end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
vanguard-0.0.5 | lib/vanguard/rule/nullary/attribute/format.rb |
vanguard-0.0.4 | lib/vanguard/rule/nullary/attribute/format.rb |
vanguard-0.0.3 | lib/vanguard/rule/nullary/attribute/format.rb |