Skip to content

Instantly share code, notes, and snippets.

@smsohan
Created July 26, 2011 17:51
Show Gist options
  • 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