Class: WpaCliWeb

Inherits:
Sinatra::Base
  • Object
show all
Includes:
WpaCliRuby
Defined in:
lib/wpa_cli_web.rb

Class Method Summary collapse

Class Method Details

.wpa_cli_clientObject



8
9
10
11
12
13
14
15
16
# File 'lib/wpa_cli_web.rb', line 8

def self.wpa_cli_client
  raise 'wpa_cli not available' if settings.production? && !WpaCliWrapper.available?

  if WpaCliWrapper.available?
    WpaCli.new
  else
    WpaCli.new(DummyWpaCliWrapper.new)
  end
end