Class: Freenom::Record
- Inherits:
-
Object
- Object
- Freenom::Record
- Defined in:
- lib/freenom/dns/models/record.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#target ⇒ Object
Returns the value of attribute target.
-
#time_to_live ⇒ Object
Returns the value of attribute time_to_live.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name:, type:, time_to_live:, target:) ⇒ Record
constructor
A new instance of Record.
- #match?(options = {}) ⇒ Boolean
Constructor Details
#initialize(name:, type:, time_to_live:, target:) ⇒ Record
Returns a new instance of Record.
7 8 9 10 11 12 |
# File 'lib/freenom/dns/models/record.rb', line 7 def initialize(name:, type:, time_to_live:, target:) @name = name @type = type @time_to_live = time_to_live @target = target end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/freenom/dns/models/record.rb', line 5 def name @name end |
#target ⇒ Object
Returns the value of attribute target.
5 6 7 |
# File 'lib/freenom/dns/models/record.rb', line 5 def target @target end |
#time_to_live ⇒ Object
Returns the value of attribute time_to_live.
5 6 7 |
# File 'lib/freenom/dns/models/record.rb', line 5 def time_to_live @time_to_live end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/freenom/dns/models/record.rb', line 5 def type @type end |
Instance Method Details
#match?(options = {}) ⇒ Boolean
14 15 16 17 18 19 20 21 |
# File 'lib/freenom/dns/models/record.rb', line 14 def match?( = {}) return false if [:name] && @name != [:name] return false if [:type] && @type != [:type] return false if [:time_to_live] && @time_to_live != [:time_to_live].to_s return false if [:target] && @target != [:target] true end |