Class: Kashi::ClientWrapper

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Filterable
Defined in:
lib/kashi/client_wrapper.rb

Instance Method Summary collapse

Methods included from Filterable

#target?

Constructor Details

#initialize(options) ⇒ ClientWrapper

Returns a new instance of ClientWrapper.



15
16
17
18
# File 'lib/kashi/client_wrapper.rb', line 15

def initialize(options)
  @client = StatusCake::Client.new(API: ENV['KASHI_SC_API_KEY'], Username: ENV['KASHI_SC_USER'])
  @options = options
end

Instance Method Details

#testsObject



20
21
22
# File 'lib/kashi/client_wrapper.rb', line 20

def tests
  @client.tests.select { |t| target?(t['WebsiteName']) }
end