Class: RecordStore::Record::SRV
- Inherits:
-
RecordStore::Record
- Object
- RecordStore::Record
- RecordStore::Record::SRV
- Defined in:
- lib/record_store/record/srv.rb
Constant Summary
Constants inherited from RecordStore::Record
Instance Attribute Summary collapse
-
#port ⇒ Object
Returns the value of attribute port.
-
#priority ⇒ Object
Returns the value of attribute priority.
-
#target ⇒ Object
Returns the value of attribute target.
-
#weight ⇒ Object
Returns the value of attribute weight.
Attributes inherited from RecordStore::Record
Instance Method Summary collapse
-
#initialize(record) ⇒ SRV
constructor
A new instance of SRV.
- #rdata ⇒ Object
- #rdata_txt ⇒ Object
Methods inherited from RecordStore::Record
#==, build_from_yaml_definition, ensure_ends_with_dot, ensure_ends_without_dot, escape, #hash, #key, #log!, long_quote, needs_long_quotes?, quote, #to_hash, #to_json, #to_s, #type, unescape, unlong_quote, unquote, #wildcard?
Constructor Details
#initialize(record) ⇒ SRV
Returns a new instance of SRV.
26 27 28 29 30 31 32 |
# File 'lib/record_store/record/srv.rb', line 26 def initialize(record) super @priority = record.fetch(:priority) @weight = record.fetch(:weight) @port = record.fetch(:port) @target = record.fetch(:target) end |
Instance Attribute Details
#port ⇒ Object
Returns the value of attribute port.
3 4 5 |
# File 'lib/record_store/record/srv.rb', line 3 def port @port end |
#priority ⇒ Object
Returns the value of attribute priority.
3 4 5 |
# File 'lib/record_store/record/srv.rb', line 3 def priority @priority end |
#target ⇒ Object
Returns the value of attribute target.
3 4 5 |
# File 'lib/record_store/record/srv.rb', line 3 def target @target end |
#weight ⇒ Object
Returns the value of attribute weight.
3 4 5 |
# File 'lib/record_store/record/srv.rb', line 3 def weight @weight end |
Instance Method Details
#rdata ⇒ Object
34 35 36 |
# File 'lib/record_store/record/srv.rb', line 34 def rdata { priority: priority, port: port, weight: weight, target: target } end |
#rdata_txt ⇒ Object
38 39 40 |
# File 'lib/record_store/record/srv.rb', line 38 def rdata_txt "#{priority} #{weight} #{port} #{target}" end |