Class: Scheming::Type::Enum
Overview
Enumeration Type Definition
The wrapper that describes a type and holds a discrete set of values of that type.
Instance Attribute Summary collapse
- #type ⇒ Scheming::Type::Base readonly
- #values ⇒ Set<Object> readonly
Instance Method Summary collapse
-
#initialize(type, values:) ⇒ Enum
constructor
A new instance of Enum.
Constructor Details
#initialize(type, values:) ⇒ Enum
Returns a new instance of Enum.
64 65 66 67 68 69 |
# File 'lib/scheming/type.rb', line 64 def initialize(type, values:) super() @type = type @values = values freeze end |
Instance Attribute Details
#type ⇒ Scheming::Type::Base (readonly)
57 58 59 |
# File 'lib/scheming/type.rb', line 57 def type @type end |
#values ⇒ Set<Object> (readonly)
60 61 62 |
# File 'lib/scheming/type.rb', line 60 def values @values end |