Class: Proxy::Dns::Dnsmasq::Default::HostEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/smart_proxy_dns_dnsmasq/backend/default.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHostEntry

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

#fqdnObject

Returns the value of attribute fqdn.



158
159
160
# File 'lib/smart_proxy_dns_dnsmasq/backend/default.rb', line 158

def fqdn
  @fqdn
end

#ipObject

Returns the value of attribute ip.



158
159
160
# File 'lib/smart_proxy_dns_dnsmasq/backend/default.rb', line 158

def ip
  @ip
end

#ttlObject

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_sObject



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