Skip to content

Instantly share code, notes, and snippets.

@smsohan
Created July 26, 2011 17:51
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 smsohan/1107355 to your computer and use it in GitHub Desktop.
Save smsohan/1107355 to your computer and use it in GitHub Desktop.
Ruby code of a simple class
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