Class: GeoIP::ASN

Inherits:
Struct
  • Object
show all
Defined in:
lib/geoip.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#asnObject

Returns the value of attribute asn

Returns:

  • (Object)

    the current value of asn



196
197
198
# File 'lib/geoip.rb', line 196

def asn
  @asn
end

#numberObject Also known as: as_num

Returns the value of attribute number

Returns:

  • (Object)

    the current value of number



196
197
198
# File 'lib/geoip.rb', line 196

def number
  @number
end

Instance Method Details

#to_hashObject



200
201
202
# File 'lib/geoip.rb', line 200

def to_hash
  Hash[each_pair.to_a]
end