Created
October 22, 2014 21:10
-
-
Save jheg/b5ff0533f5781b324c6b to your computer and use it in GitHub Desktop.
constants
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
module VehicleAge | |
def age | |
some code.... | |
puts "Your #{VEHICLETYPE} is x years old" | |
end | |
end | |
class MyCar | |
VEHICLETYPE = "car" | |
some other code ... | |
include VehicleAge | |
end | |
MyCar.age | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment