Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 146105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:32:32+00:00 2026-05-11T08:32:32+00:00

Where can I find an explanation of what the => operator means in Ruby?

  • 0

Where can I find an explanation of what the => operator means in Ruby?

For example,

class Acct < ActiveRecord::Base   validates_confirmation_of :password, :email_address, :on => :create end 

what is the => operator doing in this case?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T08:32:33+00:00Added an answer on May 11, 2026 at 8:32 am

    The symbol ‘=>’ is not an operator. It’s just a syntactic means to express that there is a relationship of ‘key-value’ between the other two elements. It’s used to define hashes (or associative arrays, as they’re called in some other languages, eg. PHP). In this sense, because ‘=>’ it’s not an operator, it doesn’t do anything (so as symbols ‘[‘ and ‘]’ don’t do anything when used to define an array). If you are still confused, have a look into the Hash Ruby class and compare it to the Array class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know where I can find a good explanation/tutorial of what and how
This is probably batch scripting 101, but I can't find any clear explanation/documentation on
This seems like it should be easy, but I can't quite find an explanation
I can't see to find a quick explanation of the differences so I can
I can't for the life of me find any decent explanation of the [file]:
What does it do exactly? Can't find an explanation in plain language
I've Googled and poked around the Go website, but I can't find an explanation
I can find the technical explanation of what data mining is in a book
Can anybody tell me where can I find full explanation of pfctl -s state
I've looked around SO, but can't find an explanation to what is going on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.