Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

303
Views
¿Es posible congelar (hacer inmutable) una clase o un método en Ruby?

En rubí:

 module Example class ExampleValidator def mymethod # do something important end end end

¿Es posible hacer que mymethod sea inmutable (es decir, sin parches mono)?

De lo contrario, también sería aceptable "congelar" toda la clase ExampleValidator .

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Sí, puede llamar a freeze un módulo.

 Example::ExampleVaildator.freeze

Sin embargo, me preguntaría por qué esto es necesario . Tal vez sea resolver un problema social con uno técnico. Una herramienta como Rubocop debería advertir sobre parches de mono.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!