hoxworth/json-schema

View on GitHub
lib/json-schema/attributes/limits/length.rb

Summary

Maintainability
A
0 mins
Test Coverage
require 'json-schema/attributes/limit'

module JSON
  class Schema
    class LengthLimitAttribute < LimitAttribute
      def self.acceptable_type
        String
      end

      def self.value(data)
        data.length
      end
    end
  end
end