Sha256: dd38289403e9320b42cdee795ade1e1b4562209af65a52d1fd801703dbd09b33

Contents?: true

Size: 267 Bytes

Versions: 4

Compression:

Stored size: 267 Bytes

Contents

# frozen_string_literal: true

using SmartCore::Ext::BasicObjectAsObject

# @api public
# @since 0.5.0
SmartCore::Types::Variadic.define_type(:Enum) do |type|
  type.runtime_attributes_checker(&:any?)

  type.define_checker { |value, enum| enum.include?(value) }
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
smart_types-0.8.0 lib/smart_core/types/variadic/enum.rb
smart_types-0.7.1 lib/smart_core/types/variadic/enum.rb
smart_types-0.7.0 lib/smart_core/types/variadic/enum.rb
smart_types-0.6.0 lib/smart_core/types/variadic/enum.rb