Class: Delivered::EnumerableType

Inherits:
Object
  • Object
show all
Defined in:
lib/delivered/types.rb

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ EnumerableType



17
18
19
# File 'lib/delivered/types.rb', line 17

def initialize(type)
  @type = type
end

Instance Method Details

#===(value) ⇒ Object



24
25
26
# File 'lib/delivered/types.rb', line 24

def ===(value)
  Enumerable === value && value.all? { |item| @type === item }
end

#inspectObject



21
# File 'lib/delivered/types.rb', line 21

def inspect = "Enumerable(#{@type.inspect})"