Module: Net::Openvpn

Defined in:
lib/net/openvpn.rb,
lib/net/openvpn/host.rb,
lib/net/openvpn/server.rb,
lib/net/openvpn/version.rb,
lib/net/openvpn/client_config.rb,
lib/net/openvpn/parser/server_config.rb

Defined Under Namespace

Modules: Parser Classes: ClientConfig, Host, Server

Constant Summary collapse

Client =
Net::Openvpn::Host
VERSION =
"0.3"

Class Method Summary collapse

Class Method Details

.basepath(path = "") ⇒ Object



10
11
12
13
# File 'lib/net/openvpn.rb', line 10

def basepath(path="")
  path = "/#{path}" unless path.empty?
  "/etc/openvpn#{path}"
end

.ccdpath(path = "") ⇒ Object



15
16
17
18
# File 'lib/net/openvpn.rb', line 15

def ccdpath(path="")
  path = "/#{path}" unless path.empty?
  basepath "ccd#{path}"
end

.host(hostname) ⇒ Object



20
21
22
# File 'lib/net/openvpn.rb', line 20

def host(hostname)
  Net::Openvpn::Host.new(hostname)
end

.server(name) ⇒ Object



24
25
26
# File 'lib/net/openvpn.rb', line 24

def server(name)
  Net::Openvpn::Server.new(name)
end