Class: NRSER::Types::HashType
Instance Attribute Summary collapse
-
#keys ⇒ Object
readonly
, :including, :exactly, :min, :max.
-
#values ⇒ Object
readonly
, :including, :exactly, :min, :max.
Attributes inherited from IsA
Instance Method Summary collapse
-
#initialize(keys: NRSER::Types::ANY, values: NRSER::Types::ANY, **options) ⇒ HashType
constructor
A new instance of HashType.
- #test(value) ⇒ Object
Methods inherited from IsA
#default_name, #from_data, #has_from_data?
Methods inherited from Type
#check, #default_name, #from_data, #from_s, #has_from_data?, #has_from_s?, #has_to_data?, #name, #respond_to?, short_name, #to_data, #to_s
Constructor Details
#initialize(keys: NRSER::Types::ANY, values: NRSER::Types::ANY, **options) ⇒ HashType
Returns a new instance of HashType.
11 12 13 14 15 16 17 18 |
# File 'lib/nrser/types/hashes.rb', line 11 def initialize keys: NRSER::Types::ANY, values: NRSER::Types::ANY, ** super ::Hash, ** @keys = NRSER::Types.make keys @values = NRSER::Types.make values end |
Instance Attribute Details
#keys ⇒ Object (readonly)
, :including, :exactly, :min, :max
9 10 11 |
# File 'lib/nrser/types/hashes.rb', line 9 def keys @keys end |
#values ⇒ Object (readonly)
, :including, :exactly, :min, :max
9 10 11 |
# File 'lib/nrser/types/hashes.rb', line 9 def values @values end |