Created
July 26, 2011 17:51
-
-
Save smsohan/1107355 to your computer and use it in GitHub Desktop.
Ruby code of a simple class
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 Weather | |
attr_accessor :temperature, :humidity | |
def initialize another_weather | |
self.temperature = another_weather.temperature | |
self.humidity = another_weather.humidity | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment