Skip to content
Browse files

added get_type classmethod

  • Loading branch information...
1 parent f68801d commit d550e82f9d627d77a255bfcccc56807a718f7573 @emonti committed Apr 30, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/rstruct.rb
View
5 lib/rstruct.rb
@@ -58,6 +58,11 @@ def sizeof(typ, reg=nil)
def default_registry
Registry::DEFAULT_REGISTRY
end
+
+ def get_type(typ, reg=Registry::DEFAULT_REGISTRY)
+ reg[typ]
+ end
+
end
extend(ClassMethods)

0 comments on commit d550e82

Please sign in to comment.
Something went wrong with that request. Please try again.