Created
November 6, 2015 00:02
-
-
Save umasenthil/8b2322e3ad47da390866 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Clock | |
attr_accessor :hour, :mins, :secs | |
def initialize(hour, mins, secs) | |
self.hour = hour | |
self.mins = mins | |
self.secs = secs | |
end | |
def show_time | |
puts "User input hour : #{@hour} minutes :#{@mins} seconds : #{@secs}" | |
end | |
end | |
myClock = Clock.new(10, 05, 30) | |
myClock.show_time |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment