| Class | Dnsruby::RR::GPOS |
| In: |
lib/dnsruby/resource/GPOS.rb
|
| Parent: | RR |
Class for Geographic Position (GPOS) resource records.
RFC 1712 (www.ietf.org/rfc/rfc1712.txt)
| TypeValue | = | Types::GPOS |
| ClassValue | = | Classes::IN |
| REQUIRED_KEYS | = | [:longitude, :latitude, :altitude] |
| altitude | [RW] | |
| latitude | [RW] | |
| longitude | [RW] |
Create an instance from an ordered parameter list, e.g.: EXAMPLE_GPOS_DATA = begin
rdata = RR::GPOS.build_rdata(EXAMPLE_LONGITUDE, EXAMPLE_LATITUDE, EXAMPLE_ALTITUDE) [EXAMPLE_HOSTNAME, Types::GPOS, Classes::IN, EXAMPLE_TTL, rdata.length, rdata, 0]
end self.from_data(*EXAMPLE_GPOS_DATA)
Create an instance from a hash of parameters, e.g.:
{
name: 'techhumans.com',
type: Types::GPOS,
ttl: 1234,
longitude: '10.0',
latitude: '20.0',
altitude: '30.0',
}
Since the type is assumed to be GPOS, it will be assigned automatially, and any other value will be overwritten. Therefore, having it present in the hash is not necessary.