class Parlour::Types::Intersection
A type which matches all of the wrapped types.
Attributes
types[R]
Public Class Methods
new(types)
click to toggle source
# File lib/parlour/types.rb, line 140 def initialize(types) @types = types.map(&method(:to_type)) end
Public Instance Methods
==(other)
click to toggle source
# File lib/parlour/types.rb, line 145 def ==(other) Intersection === other && types == other.types end
describe()
click to toggle source
# File lib/parlour/types.rb, line 163 def describe "Intersection<#{types.map(&:describe).join(', ')}>" end
generate_rbi()
click to toggle source
# File lib/parlour/types.rb, line 153 def generate_rbi "T.all(#{types.map(&:generate_rbi).join(', ')})" end
generate_rbs()
click to toggle source
# File lib/parlour/types.rb, line 158 def generate_rbs "(#{types.map(&:generate_rbs).join(' & ')})" end