Creating an object irb(main):012:0> g = Greeter.new("Ruby") => #<Greeter:0x16cac @name="Ruby"> irb(main):013:0> …
Read moreDefining a class irb(main):001:0> class Greeter irb(main):002:1> def initialize(name = "World") irb(main):003:2> @name = nam…
Read moreLet's start with an example irb(main):001:0> def h irb(main):002:1> puts "Ruby Language" irb(main):003:1> end => nil…
Read moreInteractive Ruby Ruby comes with a program that will show the results of any Ruby statements you feed it. Playing with Ruby code in interactive se…
Read moreWondering why Ruby is so popular? Its fans call it a beautiful, artful language. And yet, they say it’s handy and practical. What gives? The Idea…
Read more