class Taipo::TypeElements
A set of {Taipo::TypeElement} objects
@since 1.4.0 @api private
Public Class Methods
new(els = nil)
click to toggle source
Initialize a new set of {Taipo::TypeElement}
@param els [Array<Taipo::TypeElement>] the elements
@since 1.4.0 @api private
# File lib/taipo/type_elements.rb, line 17 def initialize(els = nil) els&.each { |el| self.push el } end
Public Instance Methods
to_s()
click to toggle source
Return the String representation of this object
@return [String] the representation as a String
@since 1.4.0 @api private
# File lib/taipo/type_elements.rb, line 27 def to_s self.reduce('') do |memo,el| (memo == '') ? el.to_s : memo + '|' + el.to_s end end