Class: Typespec::Enum
- Inherits:
-
Object
- Object
- Typespec::Enum
- Defined in:
- lib/typespec.rb
Overview
…
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*can_take_on) ⇒ Enum
constructor
A new instance of Enum.
- #valid?(value) ⇒ Boolean
Constructor Details
#initialize(*can_take_on) ⇒ Enum
Returns a new instance of Enum.
179 |
# File 'lib/typespec.rb', line 179 def initialize(*can_take_on) @can_take_on = can_take_on end |
Class Method Details
Instance Method Details
#valid?(value) ⇒ Boolean
181 |
# File 'lib/typespec.rb', line 181 def valid?(value) @can_take_on.include?(value); end |