Class: DJB::TinyDNS::AAAA
- Defined in:
- lib/djb/tinydns.rb
Constant Summary collapse
- TypeValue =
28
Constants inherited from Generic
Instance Attribute Summary
Attributes inherited from Generic
Attributes inherited from Resource
Instance Method Summary collapse
Methods inherited from Generic
Methods inherited from Resource
Constructor Details
This class inherits a constructor from DJB::TinyDNS::Generic
Instance Method Details
#encode ⇒ Object
327 328 329 330 331 332 333 |
# File 'lib/djb/tinydns.rb', line 327 def encode ipv6 = IPAddr.new(@data) a = ipv6.to_string.gsub(':', '').scan(/../).inject([]) do |acc,x| acc << sprintf('\\%.3o', x.to_i(16)) end return a.join('') end |