Class: Parlour::Types::Enumerable

Inherits:
SingleElementCollection show all
Defined in:
lib/parlour/types.rb

Overview

An enumerable with known element types.

Instance Attribute Summary

Attributes inherited from SingleElementCollection

#element

Instance Method Summary collapse

Methods inherited from SingleElementCollection

#describe, #generate_rbi, #generate_rbs, #initialize

Methods inherited from Type

#describe, #generate_rbi, #generate_rbs, #hash, to_type, #to_type

Constructor Details

This class inherits a constructor from Parlour::Types::SingleElementCollection

Instance Method Details

#==(other) ⇒ Object



315
316
317
# File 'lib/parlour/types.rb', line 315

def ==(other)
  Enumerable === other && element == other.element
end

#collection_nameObject



310
311
312
# File 'lib/parlour/types.rb', line 310

def collection_name
  'Enumerable'
end