diff --git a/README.md b/README.md index 5cbd17e..af6672f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ sandbox ======= adding a readme +adding more lines. diff --git a/fred.rb b/fred.rb index 2754fdb..46eb720 100644 --- a/fred.rb +++ b/fred.rb @@ -1,18 +1,11 @@ -# Class names must be capitalized. Technically, it's a constant. class Fred + attr_accessor :occupation, :age - # The initialize method is the constructor. The @val is - # an object value. def initialize(v) - @val = v + @occupation = v end - # Set it and get it. - def set(v) - @val = v - end - - def get - return @val + def to_s + "Fred is an #{occupation} and #{age} years old." end end