Created
August 3, 2009 20:29
-
-
Save cannikin/160810 to your computer and use it in GitHub Desktop.
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 Mountain | |
attr_reader :name, :latitude, :longitude | |
attr_accessor :country | |
def initialize(name, latitude, longitude) | |
@name, @latitude, @longitude = [name, latitude, longitude] | |
end | |
end | |
# Usage | |
k2 = Mountain.new('K2', 35.879314, 76.514283) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment