-
-
Save vogon/2975322 to your computer and use it in GitHub Desktop.
shit that works
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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