fork download
  1. class Cs
  2. def Cs.class_method()
  3. p "Class method"
  4. end
  5. def instance_method()
  6. p "Instance method"
  7. end
  8. end
  9. i = Cs.new()
  10. Cs.class_method()
  11. i.instance_method()
  12. #Cs.instance_method() 오류발생
  13. #i.class_method() 오류발생
  14.  
Success #stdin #stdout 0.01s 7408KB
stdin
Standard input is empty
stdout
"Class method"
"Instance method"