Class: RecordStore::Record::CAA
- Inherits:
-
RecordStore::Record
- Object
- RecordStore::Record
- RecordStore::Record::CAA
- Defined in:
- lib/record_store/record/caa.rb
Constant Summary collapse
- LABEL_REGEX =
'[a-z0-9](?:-*[a-z0-9])*'
- DOMAIN_REGEX =
/\A#{LABEL_REGEX}(?:\.#{LABEL_REGEX})\z/i
Constants inherited from RecordStore::Record
Instance Attribute Summary collapse
-
#flags ⇒ Object
Returns the value of attribute flags.
-
#tag ⇒ Object
Returns the value of attribute tag.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from RecordStore::Record
Instance Method Summary collapse
-
#initialize(record) ⇒ CAA
constructor
A new instance of CAA.
- #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) ⇒ CAA
Returns a new instance of CAA.
18 19 20 21 22 23 |
# File 'lib/record_store/record/caa.rb', line 18 def initialize(record) super @flags = Integer(record.fetch(:flags)) @tag = record.fetch(:tag) @value = record.fetch(:value) end |
Instance Attribute Details
#flags ⇒ Object
Returns the value of attribute flags.
3 4 5 |
# File 'lib/record_store/record/caa.rb', line 3 def flags @flags end |
#tag ⇒ Object
Returns the value of attribute tag.
3 4 5 |
# File 'lib/record_store/record/caa.rb', line 3 def tag @tag end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/record_store/record/caa.rb', line 3 def value @value end |
Instance Method Details
#rdata ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/record_store/record/caa.rb', line 25 def rdata { flags: flags, tag: tag, value: value, } end |
#rdata_txt ⇒ Object
33 34 35 |
# File 'lib/record_store/record/caa.rb', line 33 def rdata_txt "#{flags} #{tag} \"#{value}\"" end |