Class: Float
Instance Method Summary collapse
-
#pack(argument) ⇒ String
Packs the Float into a String.
Instance Method Details
#pack(argument) ⇒ String
Packs the Float into a String.
52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/ronin/formatting/extensions/binary/float.rb', line 52 def pack(argument) case argument when String [self].pack(argument) else unless Ronin::Binary::Template::FLOAT_TYPES.include?(argument) raise(ArgumentError,"unsupported integer type: #{argument}") end [self].pack(Ronin::Binary::Template::TYPES[argument]) end end |