Class: RecordStore::Record::ALIAS
- Inherits:
-
RecordStore::Record
- Object
- RecordStore::Record
- RecordStore::Record::ALIAS
- Defined in:
- lib/record_store/record/alias.rb
Constant Summary
Constants inherited from RecordStore::Record
Instance Attribute Summary collapse
-
#alias ⇒ Object
Returns the value of attribute alias.
Attributes inherited from RecordStore::Record
Instance Method Summary collapse
-
#initialize(record) ⇒ ALIAS
constructor
A new instance of ALIAS.
- #rdata ⇒ Object
- #rdata_txt ⇒ Object
- #validate_circular_reference ⇒ 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) ⇒ ALIAS
Returns a new instance of ALIAS.
12 13 14 15 |
# File 'lib/record_store/record/alias.rb', line 12 def initialize(record) super @alias = Record.ensure_ends_with_dot(record.fetch(:alias)) end |
Instance Attribute Details
#alias ⇒ Object
Returns the value of attribute alias.
3 4 5 |
# File 'lib/record_store/record/alias.rb', line 3 def alias @alias end |
Instance Method Details
#rdata ⇒ Object
17 18 19 |
# File 'lib/record_store/record/alias.rb', line 17 def rdata { alias: self.alias } end |
#rdata_txt ⇒ Object
21 22 23 |
# File 'lib/record_store/record/alias.rb', line 21 def rdata_txt self.alias end |
#validate_circular_reference ⇒ Object
25 26 27 |
# File 'lib/record_store/record/alias.rb', line 25 def validate_circular_reference errors.add(:fqdn, 'An ALIAS should not point to itself') if fqdn == @alias end |