Class: Dnsruby::Classes
- Inherits:
-
CodeMapper
- Object
- CodeMapper
- Dnsruby::Classes
- Defined in:
- lib/dnsruby/code_mappers.rb
Constant Summary collapse
- IN =
RFC 1035
1- CH =
RFC 1035
3- HS =
CHAOS = 3 # RFC 1035
4- NONE =
HESIOD = 4 # RFC 1035
254- ANY =
RFC 2136
255
Instance Attribute Summary
Attributes inherited from CodeMapper
Instance Method Summary collapse
Methods inherited from CodeMapper
#<=>, #==, #hash, #initialize, #inspect, method_missing, regexp, #set_code, #set_string
Constructor Details
This class inherits a constructor from Dnsruby::CodeMapper
Instance Method Details
#unknown_code(arg) ⇒ Object
63 64 65 66 |
# File 'lib/dnsruby/code_mappers.rb', line 63 def unknown_code(arg) Classes.add_pair('CLASS' + arg.to_s, arg) set_code(arg) end |
#unknown_string(arg) ⇒ Object
54 55 56 57 58 59 60 61 |
# File 'lib/dnsruby/code_mappers.rb', line 54 def unknown_string(arg) if (arg=~/^CLASS/i) Classes.add_pair(arg, arg.gsub('CLASS', '').to_i) set_string(arg) else raise ArgumentError.new("String #{arg} not a member of #{self.class}") end end |