class HMap::MapFile
hmap file writer
Attributes
buckets[R]
@return [Array<HMap::HMapBucketStr>] an array of the file's bucktes @note bucktes are provided in order of ascending offset.
string_table[R]
@return mapfile string_table
Public Class Methods
new(strings, buckets)
click to toggle source
@api private
# File lib/cocoapods-hmap/mapfile.rb, line 14 def initialize(strings, buckets) @string_table = strings @buckets = buckets @map_data = HMapData.new(buckets) end
Public Instance Methods
serialize()
click to toggle source
@return [String] the serialized fields of the mafile
# File lib/cocoapods-hmap/mapfile.rb, line 21 def serialize @map_data.serialize + @string_table end
write(path)
click to toggle source
Write all mafile data to the given filename. @param filename [String] the file to write to @return [void]
# File lib/cocoapods-hmap/mapfile.rb, line 28 def write(path) contents = serialize Utils.update_changed_file(path, contents) end