Class: Safelylaunch::Client
- Inherits:
-
Object
- Object
- Safelylaunch::Client
- Defined in:
- lib/safelylaunch/client.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#faraday_connection ⇒ Object
readonly
Returns the value of attribute faraday_connection.
Instance Method Summary collapse
- #enable?(toggle_key) ⇒ Boolean
-
#initialize(connection) ⇒ Client
constructor
A new instance of Client.
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
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
3 4 5 |
# File 'lib/safelylaunch/client.rb', line 3 def connection @connection end |
#faraday_connection ⇒ Object (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
9 10 11 12 |
# File 'lib/safelylaunch/client.rb', line 9 def enable?(toggle_key) response = connection.get(toggle_key) response[:enable] end |