Sha256: 8adcc8b63f867bd49317adec1d2f402d87143b979228cbb4855a1d292bb1b5dd
Contents?: true
Size: 673 Bytes
Versions: 20
Compression:
Stored size: 673 Bytes
Contents
require 'representable/json/collection' require 'representable/json/hash' # Represents a validators hash for a model. module ValidatorsRepresenter class ValidatorClient attr_accessor :kind, :options end # Represents a single Validator instance. module ValidatorRepresenter include Roar::Representer::JSON property :kind hash :options end # Represents an array of validators for an attribute. module AttributeValidators include Representable::JSON::Collection items :extend => ValidatorRepresenter, :class => ValidatorClient end include Representable::JSON::Hash values :extend => AttributeValidators, :class => Array end
Version data entries
20 entries across 20 versions & 1 rubygems