Created
September 22, 2011 06:01
-
-
Save smtalim/1234158 to your computer and use it in GitHub Desktop.
Git Branching examples
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 Display < MotorCycle | |
def dispAttr | |
'Color of MotorCycle is ' + @color | |
'Make of MotorCycle is ' + @make | |
end | |
end |
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 MotorCycle | |
def initialize(make, color) | |
# Instance variables | |
@make = make | |
@color = color | |
end | |
def startEngine | |
if (@engineState) | |
'Engine is already Running' | |
else | |
@engineState = true | |
'Engine Idle' | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment