class Proxy::Dns::Dnsmasq::Openwrt::DSL
Public Class Methods
new(config)
click to toggle source
# File lib/smart_proxy_dns_dnsmasq/backend/openwrt.rb, line 113 def initialize(config) @configs = config end
Public Instance Methods
config(args)
click to toggle source
# File lib/smart_proxy_dns_dnsmasq/backend/openwrt.rb, line 121 def config(args) type, name = args @current_config = Config.new type, name @configs << @current_config end
list(args)
click to toggle source
# File lib/smart_proxy_dns_dnsmasq/backend/openwrt.rb, line 133 def list(args) name, value = args @current_config.options[name] = [] unless @current_config.options[name] @current_config.options[name] << value end
method_missing(m, *args)
click to toggle source
# File lib/smart_proxy_dns_dnsmasq/backend/openwrt.rb, line 117 def method_missing(m, *args) [m, args].flatten end
option(args)
click to toggle source
# File lib/smart_proxy_dns_dnsmasq/backend/openwrt.rb, line 127 def option(args) name, value = args @current_config.options[name] = value end