Class: RRs::OPT
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Attributes inherited from Resource
Class Method Summary collapse
Instance Method Summary collapse
- #encode_rdata(msg) ⇒ Object
-
#initialize(data) ⇒ OPT
constructor
A new instance of OPT.
Methods inherited from Resource
Constructor Details
#initialize(data) ⇒ OPT
Returns a new instance of OPT.
4 5 6 |
# File 'lib/rrs/opt.rb', line 4 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
3 4 5 |
# File 'lib/rrs/opt.rb', line 3 def data @data end |
Class Method Details
.decode_rdata(msg) ⇒ Object
12 13 14 |
# File 'lib/rrs/opt.rb', line 12 def self.decode_rdata(msg) return self.new(msg.get_bytes) end |
Instance Method Details
#encode_rdata(msg) ⇒ Object
8 9 10 |
# File 'lib/rrs/opt.rb', line 8 def encode_rdata(msg) msg.put_bytes(data) end |