lib/ronin/binary/template.rb in ronin-support-0.5.0.rc2 vs lib/ronin/binary/template.rb in ronin-support-0.5.0
- old
+ new
@@ -325,9 +325,16 @@
@fields = fields
@template = self.class.compile(@fields,options)
end
#
+ # @see #initialize
+ #
+ def self.[](*fields)
+ new(fields)
+ end
+
+ #
# Translates the type of the field.
#
# @param [Symbol] type
# The type to translate.
#