Class: Fried::Typings::OneOf
- Inherits:
-
Object
- Object
- Fried::Typings::OneOf
- Defined in:
- lib/fried/typings/one_of.rb
Overview
Checks if the object #is_a? object of the passed types
Instance Method Summary collapse
-
#initialize(*types) ⇒ OneOf
constructor
A new instance of OneOf.
- #valid?(obj) ⇒ Boolean
Methods included from Type
Methods included from MetaType
Constructor Details
#initialize(*types) ⇒ OneOf
Returns a new instance of OneOf.
18 19 20 |
# File 'lib/fried/typings/one_of.rb', line 18 def initialize(*types) @types = types end |