Class: Proxy::Dns::Dnsmasq::Default::HostEntry
- Inherits:
-
Object
- Object
- Proxy::Dns::Dnsmasq::Default::HostEntry
- Defined in:
- lib/smart_proxy_dns_dnsmasq/backend/default.rb
Instance Attribute Summary collapse
-
#fqdn ⇒ Object
Returns the value of attribute fqdn.
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#ttl ⇒ Object
Returns the value of attribute ttl.
Instance Method Summary collapse
-
#initialize ⇒ HostEntry
constructor
A new instance of HostEntry.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ HostEntry
Returns a new instance of HostEntry.
159 160 161 162 |
# File 'lib/smart_proxy_dns_dnsmasq/backend/default.rb', line 159 def initialize @fqdn = [] @ip = [] end |
Instance Attribute Details
#fqdn ⇒ Object
Returns the value of attribute fqdn.
158 159 160 |
# File 'lib/smart_proxy_dns_dnsmasq/backend/default.rb', line 158 def fqdn @fqdn end |
#ip ⇒ Object
Returns the value of attribute ip.
158 159 160 |
# File 'lib/smart_proxy_dns_dnsmasq/backend/default.rb', line 158 def ip @ip end |
#ttl ⇒ Object
Returns the value of attribute ttl.
158 159 160 |
# File 'lib/smart_proxy_dns_dnsmasq/backend/default.rb', line 158 def ttl @ttl end |
Instance Method Details
#to_s ⇒ Object
164 165 166 |
# File 'lib/smart_proxy_dns_dnsmasq/backend/default.rb', line 164 def to_s "host-record=#{fqdn.join ','},#{ip.join ','}#{ttl && ',' + ttl}" end |