Syntax

Ruby Symbol Syntax

In Ruby, symbol: a lightweight, immutable name — :status

Quick Answer

Syntax
:status
RubySyntax

Symbol

Code example
:status

A lightweight, immutable name.

Learn More

How to symbol in Ruby

  1. Open your Ruby file or editor.
  2. Copy the example, then replace its sample names and values for your code.

Ruby Symbol Syntax

Use :status.

Related Syntax References

Frequently asked questions

What is the Ruby syntax for symbol?

Use this pattern: :status

Can I copy this Ruby code example?

Yes. Use Copy code and adapt the example to your program.

Is this Ruby syntax different on Mac or Windows?

No. The language syntax is the same across operating systems.

Official source · How we verify