Sha256: 36b2d2192cfc59bfb40cb065222bc69e9d2e4fe1debb06cf1fbe3e768d1c120d

Contents?: true

Size: 494 Bytes

Versions: 18

Compression:

Stored size: 494 Bytes

Contents

class I2lStringData  < BinData::BasePrimitive
  
  def read_and_return_value(io)
    country_long = eval_parameter(:country_long)
    io.seekbytes(-4) if country_long
    file = io.instance_variable_get('@raw_io')
    addr = BinData::Uint32le.read(io)
    old_offset = file.tell
    country_long ? file.seek(addr + 3) : file.seek(addr)
    length = BinData::Uint8.read(file)
    res = BinData::String.new(:length => length).read(file)
    file.seek(old_offset)
    res
  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
ip2location_ruby-8.7.3 lib/ip2location_ruby/i2l_string_data.rb
ip2location_ruby-8.7.2 lib/ip2location_ruby/i2l_string_data.rb
ip2location_ruby-8.7.1 lib/ip2location_ruby/i2l_string_data.rb
ip2location_ruby-8.7.0 lib/ip2location_ruby/i2l_string_data.rb
ip2location_ruby-8.6.0 lib/ip2location_ruby/i2l_string_data.rb
ip2location_ruby-8.5.0 lib/ip2location_ruby/i2l_string_data.rb
ip2location_ruby-8.4.0 lib/ip2location_ruby/i2l_string_data.rb
ip2location_ruby-8.3.2 lib/ip2location_ruby/i2l_string_data.rb
ip2location_ruby-8.3.1 lib/ip2location_ruby/i2l_string_data.rb
ip2location_ruby-8.3.0 lib/ip2location_ruby/i2l_string_data.rb
ip2location_ruby-8.2.3 lib/ip2location_ruby/i2l_string_data.rb
ip2location_ruby-8.2.2 lib/ip2location_ruby/i2l_string_data.rb
ip2location_ruby-8.2.1 lib/ip2location_ruby/i2l_string_data.rb
ip2location_ruby-8.2.0 lib/ip2location_ruby/i2l_string_data.rb
ip2location_ruby-8.1.1 lib/ip2location_ruby/i2l_string_data.rb
ip2location_ruby-8.1.0 lib/ip2location_ruby/i2l_string_data.rb
ip2location_ruby-8.0.3 lib/ip2location_ruby/i2l_string_data.rb
ip2location_ruby-8.0.2 lib/ip2location_ruby/i2l_string_data.rb