class Parlour::Types::Tuple
A fixed-length array of items, each with a known type.
Attributes
types[R]
Public Class Methods
new(types)
click to toggle source
# File lib/parlour/types.rb, line 171 def initialize(types) @types = types.map(&method(:to_type)) end
Public Instance Methods
==(other)
click to toggle source
# File lib/parlour/types.rb, line 176 def ==(other) Tuple === other && types == other.types end
describe()
click to toggle source
# File lib/parlour/types.rb, line 194 def describe "[#{types.map(&:describe).join(', ')}]" end
generate_rbi()
click to toggle source
# File lib/parlour/types.rb, line 184 def generate_rbi "[#{types.map(&:generate_rbi).join(', ')}]" end
generate_rbs()
click to toggle source
# File lib/parlour/types.rb, line 189 def generate_rbs "[#{types.map(&:generate_rbs).join(', ')}]" end