Can someone show me a simple class and method, then show me how to
initialize and call the method?
Thanks,
Mike
Can someone show me a simple class and method, then show me how to
initialize and call the method?
Thanks,
Mike
class Mike
def learns_ruby
puts “woohoo!”
end
end
mike = Mike.new
mike.learns_ruby
Too simple…
Thanks!
Mike 1. wrote in post #979715:
Too simple…
Thanks!
http://www.ruby-doc.org/docs/ProgrammingRuby/
Click on chapter “Classes, Objects, and Variables”
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs