ryantownsend (owner)

Revisions

gist: 40517 Download_button fork
public
Public Clone URL: git://gist.github.com/40517.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class Person
  def initialize(eye_colour = 'blue')
    @eye_colour = eye_colour
  end
 
  def eye_colour
    @eye_colour
  end
 
  def yawn
    puts 'yawn!'
  end
end
 
# Create our new person:
p = Person.new('brown')
p.yawn
# "yawn!"
p.eye_colour
# "brown"