Class: Delivered::ArrayOfType
- Inherits:
-
Object
- Object
- Delivered::ArrayOfType
- Defined in:
- lib/delivered/types.rb
Instance Method Summary collapse
- #===(value) ⇒ Object
-
#initialize(type) ⇒ ArrayOfType
constructor
A new instance of ArrayOfType.
- #inspect ⇒ Object
Constructor Details
#initialize(type) ⇒ ArrayOfType
Returns a new instance of ArrayOfType.
35 36 37 |
# File 'lib/delivered/types.rb', line 35 def initialize(type) @type = type end |
Instance Method Details
#===(value) ⇒ Object
42 43 44 |
# File 'lib/delivered/types.rb', line 42 def ===(value) Array === value && value.all? { |item| @type === item } end |
#inspect ⇒ Object
39 |
# File 'lib/delivered/types.rb', line 39 def inspect = "ArrayOf(#{@type.inspect})" |