Skip to content

Commit

Permalink
added get_type classmethod
Browse files Browse the repository at this point in the history
  • Loading branch information
emonti committed Apr 30, 2011
1 parent f68801d commit d550e82
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/rstruct.rb
Expand Up @@ -58,6 +58,11 @@ def sizeof(typ, reg=nil)
def default_registry def default_registry
Registry::DEFAULT_REGISTRY Registry::DEFAULT_REGISTRY
end end

def get_type(typ, reg=Registry::DEFAULT_REGISTRY)
reg[typ]
end

end end


extend(ClassMethods) extend(ClassMethods)
Expand Down

0 comments on commit d550e82

Please sign in to comment.