Class: Net::Openvpn::Host
- Inherits:
-
Object
- Object
- Net::Openvpn::Host
- Defined in:
- lib/net/openvpn/host.rb
Instance Method Summary collapse
- #generate_key ⇒ Object
- #generate_ovpn ⇒ Object
-
#initialize(hostname) ⇒ Host
constructor
A new instance of Host.
- #ip=(ip) ⇒ Object
- #network=(network) ⇒ Object
- #save ⇒ Object
Constructor Details
#initialize(hostname) ⇒ Host
Returns a new instance of Host.
5 6 7 8 |
# File 'lib/net/openvpn/host.rb', line 5 def initialize(hostname) @hostname = hostname @config = Net::Openvpn::ClientConfig.new(@hostname) end |
Instance Method Details
#generate_key ⇒ Object
10 11 12 |
# File 'lib/net/openvpn/host.rb', line 10 def generate_key end |
#generate_ovpn ⇒ Object
14 15 16 |
# File 'lib/net/openvpn/host.rb', line 14 def generate_ovpn end |
#ip=(ip) ⇒ Object
18 19 20 |
# File 'lib/net/openvpn/host.rb', line 18 def ip=(ip) @config.ip = ip end |
#network=(network) ⇒ Object
22 23 24 |
# File 'lib/net/openvpn/host.rb', line 22 def network=(network) @config.network = network end |
#save ⇒ Object
26 27 28 |
# File 'lib/net/openvpn/host.rb', line 26 def save @config.save end |