Skip to content

Instantly share code, notes, and snippets.

@shadoi
Forked from manuelbrunner/gist:1138003
Created August 10, 2011 20:06
Show Gist options
  • Save shadoi/1138062 to your computer and use it in GitHub Desktop.
Save shadoi/1138062 to your computer and use it in GitHub Desktop.
class Test
def initialize
@atts = Hash.new
end
def prop=(value)
@atts[:prop] = value
end
def prop
@atts[:prop]
end
def set_prop(value)
self.prop = value
end
end
t = Test.new
t.set_prop 'a'
puts t.prop.nil?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment