Skip to content

Instantly share code, notes, and snippets.

@vogon
Forked from robhanlon22/gist:2975121
Created June 22, 2012 21:31
Show Gist options
  • Save vogon/2975322 to your computer and use it in GitHub Desktop.
Save vogon/2975322 to your computer and use it in GitHub Desktop.
shit that works
require './helpers'
module CLR
def self.remove_const?(sym)
begin
remove_const sym
rescue
end
end
remove_const? :MDModule
class MDTable
class << self
def dump
puts @schema
end
def word(name)
@schema ||= []
@schema << "word #{name};"
end
def index(tables, name)
@schema ||= []
@schema << "index #{tables}, #{name};"
end
end
end
class MDModule < MDTable
word :generation
index :string, :name
index :guid, :mvid
index :guid, :encid
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment