This is a course meant to give you the basics of Ruby and Rails with the assumption that you'll use the resources provided below to further your learning.
It assumes you are familiar with basic programming concepts and the basics of object oriented programming.
Create a file named hello.rb
puts "Hello!"
$ ruby hello.rb
$ irb
1.9.3-p194 :001 >
def hello
puts "Hello!"
end
hello
def hello(name)
puts "Hello, #{name}!"
end
hello("Brian")
class Person
end
brian = Person.new
class Person
def initialize
puts "Initialize!"
end
end
class Person
def initialize(name)
puts "Initializing '#{name}'"
end
end
brian = Person.new("Brian")
class Person
def hello
puts "Hello there!"
end
end
brian = Person.new("Brian")
brian.hello
class Employee < Person
end
module Hello
end
module Hello
def hello
puts "Hello!"
end
end
Hello::hello
include Hello
$ gem install pry
Is this doc going to be updated any time soon? Great idea, but quite a few things missing. :(