class Safelylaunch::MockConnection
Attributes
api_token[R]
connection[R]
host[R]
logger[R]
Public Class Methods
new(api_token:, toggles: {}, logger: Logger.new(STDOUT), host: 'http://localhost:2300')
click to toggle source
# File lib/safelylaunch/mock_connection.rb, line 5 def initialize(api_token:, toggles: {}, logger: Logger.new(STDOUT), host: 'http://localhost:2300') @api_token = api_token @logger = logger @host = host @connection = nil @toggles = toggles end
Public Instance Methods
get(key)
click to toggle source
# File lib/safelylaunch/mock_connection.rb, line 13 def get(key) result = @toggles.fetch(key, false) { key: key, enable: result } end