Skip to content

Instantly share code, notes, and snippets.

@smtalim
Created September 22, 2011 06:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smtalim/1234158 to your computer and use it in GitHub Desktop.
Save smtalim/1234158 to your computer and use it in GitHub Desktop.
Git Branching examples
class Display < MotorCycle
def dispAttr
'Color of MotorCycle is ' + @color
'Make of MotorCycle is ' + @make
end
end
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