fork download
  1. class SomeClass
  2. end
  3.  
  4. def SomeClass.something
  5. puts "Hello!"
  6. end
  7.  
  8. SomeClass.something
  9.  
  10. # very similar to the below:
  11.  
  12. some_object = "This is a string"
  13.  
  14. def some_object.something
  15. upcase
  16. end
  17.  
  18. puts some_object.something
Success #stdin #stdout 0.02s 7452KB
stdin
Standard input is empty
stdout
Hello!
THIS IS A STRING