Skip to content

Instantly share code, notes, and snippets.

@kennethkalmer
Created April 2, 2009 14:56
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 kennethkalmer/89231 to your computer and use it in GitHub Desktop.
Save kennethkalmer/89231 to your computer and use it in GitHub Desktop.
irb(main):001:0> require 'ostruct'
=> true
irb(main):002:0> obj = OpenStruct.new
=> #<OpenStruct>
irb(main):003:0> class << obj
irb(main):004:1> def to_s
irb(main):005:2> "string"
irb(main):006:2> end
irb(main):007:1> end
=> nil
irb(main):008:0> obj.to_s
=> "string"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment