lib/sixarm_ruby_ramp/array/join.rb
def join(*fixes)
    if fixes.is_a?(String) then return self.ruby_join(fixes) end
    return case fixes.size
    when 0
      ruby_join
    when 1
      ruby_join(fixes[0].to_s)
    when 2
      join_prefix_suffix(*fixes)
    when 3
      join_prefix_suffix_infix(*fixes)
    else
      raise ArgumentError, "join() takes 0-3 arguments; you gave #{fixes.size}]"
    end
  end
# Concatenate the items into a string by join.
#
# @return [String] concatenated string
#
# @example Join with infix
#   list=['a','b','c']
#   list.join("*") => "a*b*c"
#
# @example Join with prefix and suffix
#   list=['a','b','c']
#   list.join("[","]") => "[a][b][c]"
#
# @example Join with prefix, suffix, and infix
#   list=['a','b','c']
#   list.join("*","[","]") => "[a]*[b]*[c]"
#
Concatenate the items into a string by join.
Concatenate the items into a string by join .
def join(*fixes)
    if fixes.is_a?(String) then return self.ruby_join(fixes) end
    return case fixes.size
    when 0
      ruby_join
    when 1
      ruby_join(fixes[0].to_s)
    when 2
      join_prefix_suffix(*fixes)
    when 3
      join_prefix_suffix_infix(*fixes)
    else
      raise ArgumentError, "join() takes 0-3 arguments; you gave #{fixes.size}]"
    end
  end
def join ( * fixes ) if fixes . is_a? ( String ) then return self . ruby_join ( fixes ) end return case fixes . size when 0 ruby_join when 1 ruby_join ( fixes [ 0 ] . to_s ) when 2 join_prefix_suffix ( * fixes ) when 3 join_prefix_suffix_infix ( * fixes ) else raise ArgumentError , "join() takes 0-3 arguments; you gave #{fixes.size}]" end end
Concatenate the items into a string by join.
Concatenate the items into a string by join .
None
String
fixes
example
None
example
None
example
None