Class: Y2Network::Clients::DNS
- Inherits:
-
Yast::Client
- Object
- Yast::Client
- Y2Network::Clients::DNS
- Includes:
- Yast::Logger
- Defined in:
- src/lib/y2network/clients/dns.rb
Overview
DNS client for configuring DNS and hostname settings
Instance Attribute Summary collapse
-
#hostname ⇒ Object
readonly
Returns the value of attribute hostname.
-
#nameserver1 ⇒ Object
readonly
Returns the value of attribute nameserver1.
-
#nameserver2 ⇒ Object
readonly
Returns the value of attribute nameserver2.
-
#nameserver3 ⇒ Object
readonly
Returns the value of attribute nameserver3.
Instance Method Summary collapse
-
#initialize ⇒ DNS
constructor
Constructor.
- #main ⇒ Object
Constructor Details
#initialize ⇒ DNS
Constructor
41 42 43 44 45 46 47 48 49 |
# File 'src/lib/y2network/clients/dns.rb', line 41 def initialize textdomain "network" Yast.include self, "network/services/dns.rb" @hostname = "hostname" @nameserver1 = "nameserver1" @nameserver2 = "nameserver2" @nameserver3 = "nameserver3" end |
Instance Attribute Details
#hostname ⇒ Object (readonly)
Returns the value of attribute hostname.
38 39 40 |
# File 'src/lib/y2network/clients/dns.rb', line 38 def hostname @hostname end |
#nameserver1 ⇒ Object (readonly)
Returns the value of attribute nameserver1.
38 39 40 |
# File 'src/lib/y2network/clients/dns.rb', line 38 def nameserver1 @nameserver1 end |
#nameserver2 ⇒ Object (readonly)
Returns the value of attribute nameserver2.
38 39 40 |
# File 'src/lib/y2network/clients/dns.rb', line 38 def nameserver2 @nameserver2 end |
#nameserver3 ⇒ Object (readonly)
Returns the value of attribute nameserver3.
38 39 40 |
# File 'src/lib/y2network/clients/dns.rb', line 38 def nameserver3 @nameserver3 end |
Instance Method Details
#main ⇒ Object
51 52 53 |
# File 'src/lib/y2network/clients/dns.rb', line 51 def main log_and_return { CommandLine.Run(cmdline_definition) } end |