Class: Fried::Typings::TupleOf
- Inherits:
-
Object
- Object
- Fried::Typings::TupleOf
- Defined in:
- lib/fried/typings/tuple_of.rb
Overview
Checks if Array fields match types specified on a 1-to-1 relationship. So ‘[123, “test”, nil]` matches `TupleOf[Numeric, String, NilClass]`
Instance Method Summary collapse
-
#initialize(*types) ⇒ TupleOf
constructor
A new instance of TupleOf.
- #valid?(ary) ⇒ Boolean
Methods included from Type
Methods included from MetaType
Constructor Details
#initialize(*types) ⇒ TupleOf
Returns a new instance of TupleOf.
19 20 21 |
# File 'lib/fried/typings/tuple_of.rb', line 19 def initialize(*types) @types = types end |