# Resolv::DNS::Resource::Generic (Class)

In: | resolv.rb
Parent: | Resource

## Methods

create decode_rdata encode_rdata new

## Attributes

data | [R] |

## Public Class methods

new(data)

[Source]

    # File resolv.rb, line 1296
            def initialize(data)
              @data = data
            end

decode_rdata(msg)

[Source]

    # File resolv.rb, line 1305
            def self.decode_rdata(msg)
              return self.new(msg.get_bytes)
            end

create(type_value, class_value)

[Source]

    # File resolv.rb, line 1309
            def self.create(type_value, class_value)
              c = Class.new(Generic)
              c.const_set(:TypeValue, type_value)
              c.const_set(:ClassValue, class_value)
              Generic.const_set("Type#{type_value}_Class#{class_value}", c)
              ClassHash[[type_value, class_value]] = c
              return c
            end

## Public Instance methods

encode_rdata(msg)

[Source]

    # File resolv.rb, line 1301
            def encode_rdata(msg)
              msg.put_bytes(data)
            end

[Validate]