Class: Safelylaunch::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/safelylaunch/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ Client

Returns a new instance of Client.



5
6
7
# File 'lib/safelylaunch/client.rb', line 5

def initialize(connection)
  @connection = connection
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



3
4
5
# File 'lib/safelylaunch/client.rb', line 3

def connection
  @connection
end

#faraday_connectionObject (readonly)

Returns the value of attribute faraday_connection.



3
4
5
# File 'lib/safelylaunch/client.rb', line 3

def faraday_connection
  @faraday_connection
end

Instance Method Details

#enable?(toggle_key) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
# File 'lib/safelylaunch/client.rb', line 9

def enable?(toggle_key)
  response = connection.get(toggle_key)
  response[:enable]
end