Class: Rtype::Behavior::TypedArray
- Defined in:
- lib/rtype/behavior/typed_array.rb
Instance Method Summary collapse
- #error_message(value) ⇒ Object
-
#initialize(type) ⇒ TypedArray
constructor
A new instance of TypedArray.
- #valid?(value) ⇒ Boolean
Methods inherited from Base
Constructor Details
#initialize(type) ⇒ TypedArray
Returns a new instance of TypedArray.
4 5 6 7 |
# File 'lib/rtype/behavior/typed_array.rb', line 4 def initialize(type) @type = type Rtype.assert_valid_argument_type_sig_element(@type) end |
Instance Method Details
#error_message(value) ⇒ Object
20 21 22 |
# File 'lib/rtype/behavior/typed_array.rb', line 20 def (value) "Expected #{value.inspect} to be an array with type #{@type.inspect}" end |