HexLibraryHexLibrary
</> HexCodeSign inSign up
PythonJavaScriptTypeScriptCC++JavaPHPGoRustRubyBashSQLLuaPerlCOBOLPascalDelphiFortranDartSwiftC#JuliaGroovyRElixirHaskellKotlinScalaClassic ASPClipperMS-DOS
LESSONS
Introduction to RubyVariablesData TypesOperatorsStringsArraysHash (Dictionary)Conditions (if / else)LoopsMethods (def)Classes
REFERENCE
📖 Overview
🖥️ Output & Input
📦 Variables
🔢 Numbers & Math
✍️ String
📋 Array
🗂️ Hash (Dictionary)
🔁 Condition & Loop
🧩 Method & Class
Ruby›REFERENCE

Ruby — Command Reference

Ruby's most used commands and methods — simple, readable, and enjoyable. Each with an explanation and a working example.

8 categories · 32 commands

🖥️

Output & Input

Printing to the screen and embedding values into text.

puts / print / pString interpolation ( #{} )gets
3 commands →
📦

Variables

Variables and constants.

variableConstant (UPPERCASE)
2 commands →
🔢

Numbers & Math

Arithmetic and mathematical methods.

Arithmetic ( + - * / % ** )round / floor / ceil / absMath.sqrt / rand
3 commands →
✍️

String

String methods: length, transformation, replacement, splitting.

.lengthupcase / downcase / capitalizestrip / chompgsub / sub+2
6 commands →
📋

Array

Ordered data and powerful array methods.

arr [ ]push / << / popinclude? / indexmap+3
7 commands →
🗂️

Hash (Dictionary)

Key-value mappings.

hash { }fetch / keys / valueseach (hash)
3 commands →
🔁

Condition & Loop

Decision making and repetition.

if / elsif / elseTernary operator / unlesscase / whentimes / upto / each+1
5 commands →
🧩

Method & Class

Defining methods (functions) and classes.

defDefault parameterclass / initialize
3 commands →
HexLibraryHexLibrary

Learn programming more clearly. Every command is explained line by line with colors, reinforced with runnable exercises, test your code instantly — all in one place, free.

Learn

  • Home
  • Languages & Lessons
  • HexCode

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Use

Other Projects

  • HexToolz
  • Free Service Manuals
© 2026 HexLibrary · The clearest way to learn code