class Syspass
Attributes
options[R]
url[R]
Public Class Methods
new(url, options = {})
click to toggle source
# File lib/syspass.rb, line 60 def initialize(url, options = {}) validate_options(options) @url = URI.parse(url) @options = options end
Public Instance Methods
method_missing(method_name)
click to toggle source
# File lib/syspass.rb, line 75 def method_missing(method_name) Syspass::Method.new(method_name, self) end
validate_options(options)
click to toggle source
# File lib/syspass.rb, line 66 def validate_options(options) unless options.key?(:authToken) raise ArgumentError, "Expected :authToken in options. Got: #{options.inspect}" end unless options.key?(:tokenPass) warn("WARNING: Some queries require :tokenPass and you didn't set it.") end end