Skip to content

Instantly share code, notes, and snippets.

@FerPerales
Created October 13, 2012 13:48
Show Gist options
  • Save FerPerales/3884684 to your computer and use it in GitHub Desktop.
Save FerPerales/3884684 to your computer and use it in GitHub Desktop.
Evaluations
class RubyMeeting
attr_accessor :name, :number, :date
def initialize( aName, aNumber, aDate = Time.now )
@name = aName
@number = aNumber
@date = aDate
end
def attendance
return 10
end
end
ob = RubyMeeting.new( "Strings and ranges", "3", "October 13" )
puts( "The topic of the #{ob.number}th meeting was #{ob.name} and was held on #{ob.date}" )
puts("#{ob.attendance} cool guys attended")
=begin
prints:
The topic of the 3th meeting was Strings and ranges and was held on October 13
10 cool guys attended
=end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment