Skip to content

Instantly share code, notes, and snippets.

@BramBo
Created March 18, 2009 08:10
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 BramBo/80995 to your computer and use it in GitHub Desktop.
Save BramBo/80995 to your computer and use it in GitHub Desktop.
require "rubygems"
require "sandbox"
s = Sandbox.new
s.eval %{
class Book
attr_accessor :author, :title
def initialize(a, t)
@author, @title = a, t
end
end
}
book = s.eval("book = Book.new('Stanislaw Lem', 'The Star Diaries')")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment