1
0
mirror of https://github.com/onkelbeh/cheatsheets.git synced 2025-10-16 15:38:44 +02:00
cheatsheets/tomdoc.md
Rico Sta. Cruz 511de900ba
Formatting updates (#2133)
- Update some sheets which have very long sections
- Remove `layout: 2017/sheet` (everything has the same layout now)
- Remove outdated sheets
2024-04-03 18:30:24 +11:00

1.1 KiB

title, category
title category
Tomdoc Markup

Tomdoc

{: .-prime}

# Public: Duplicate some text an arbitrary number of times.
#
# text  - The String to be duplicated.
# count - The Integer number of times to duplicate the text.
#
# Examples
#
#   multiplex('Tom', 4)
#   # => 'TomTomTomTom'
#
# Returns the duplicated String.
def multiplex(text, count)
  text * count
end

See tomdoc.org.

Tags

  • Deprecated
  • Internal
  • Public

Options

# options - The Hash options used to refine the selection (default: {}):
#           :color  - The String color to restrict by (optional).
#           :weight - The Float weight to restrict by. The weight should
#                     be specified in grams (optional).

Yields

# Yields the Integer index of the iteration.
# Returns the duplicated String.
# Returns nothing.
# Raises Errno::ENOENT if the file can't be found.
# Returns something else and this is a wrapped
#   multi-line comment.

Signatures

# Signature
#
#   find_by_<field>[_and_<field>...](args)
#