Skip to content

Instantly share code, notes, and snippets.

@vinbarnes

vinbarnes/gist:20813

Created Oct 29, 2008
Embed
What would you like to do?
>> 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
You can’t perform that action at this time.