Skip to content

Instantly share code, notes, and snippets.

@vinbarnes
Created October 29, 2008 20:07
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 vinbarnes/20813 to your computer and use it in GitHub Desktop.
Save vinbarnes/20813 to your computer and use it in GitHub Desktop.
>> data = OpenStruct.new({:so => 'what', :what => 'ever'})
=> #<OpenStruct so="what", what="ever">
>> data.so
=> "what"
>> class << data; alias_method :old_so, :so; def so() old_so.upcase; end end
=> nil
>> data.so
=> "WHAT"
>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment