Project

typespec

0.0
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Typespec is a way to specify complex schema made of types or specific values and validate against them.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Gem Version Build Status Code Climate Dependency Status

🔩 Specify complex schema made of types or specific values.

module Defines
  def self.typespec
    Typespec.hash[Typespec.string => Typespec.or[Typespec.nothing,
                                                 Typespec.boolean,
                                                 Typespec.number,
                                                 Typespec.string]]
  end
end

Defines.typespec.valid?('YETI_LINKAGE' => 'YETI_LINKAGE_STATIC',
                        '__YETI_IS_BEING_COMPILED__' => true,
                        'YETI_CONFIGURATION' => 'YETI_CONFIGURATION_DEBUG',
                        '_HAS_EXCEPTIONS' => false,
                        '_SCL_SECURE_NO_WARNINGS' => true,
                        '_CRT_SECURE_NO_WARNINGS' => true,
                        '_CRT_SECURE_NO_DEPRECATE' => true,
                        '_SECURE_SCL_THROWS' => false,
                        '_SILENCE_DEPRECATION_OF_SECURE_SCL_THROWS' => true,
                        '_USING_V110_SDK71_' => true,
                        '_DEBUG' => true,
                        '_HAS_ITERATOR_DEBUGGING' => true,
                        '_SECURE_SCL' => true)

#=> true