Created
October 13, 2012 13:48
-
-
Save FerPerales/3884684 to your computer and use it in GitHub Desktop.
Evaluations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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