Class: RubyHome::DNS::Service
- Inherits:
-
Object
- Object
- RubyHome::DNS::Service
- Defined in:
- lib/ruby_home/dns/service.rb
Instance Method Summary collapse
-
#initialize(configuration:) ⇒ Service
constructor
A new instance of Service.
- #register ⇒ Object
- #update ⇒ Object
Constructor Details
#initialize(configuration:) ⇒ Service
Returns a new instance of Service.
4 5 6 |
# File 'lib/ruby_home/dns/service.rb', line 4 def initialize(configuration: ) @configuration = configuration end |
Instance Method Details
#register ⇒ Object
14 15 16 |
# File 'lib/ruby_home/dns/service.rb', line 14 def register dnssd_service end |
#update ⇒ Object
8 9 10 11 12 |
# File 'lib/ruby_home/dns/service.rb', line 8 def update return if RbConfig::CONFIG['target_os'] =~ /linux/ dnssd_service.add_record(DNSSD::Record::TXT, text_record.encode) end |