class Fabes::Configuration
Attributes
database[RW]
factor[RW]
Public Class Methods
new()
click to toggle source
# File lib/fabes/configuration.rb, line 5 def initialize @database = ENV['FABES_DB_URL'] || ENV['REDISTOGO_URL'] @factor = 0.1 end
Public Instance Methods
bandit_factor(percentage)
click to toggle source
# File lib/fabes/configuration.rb, line 16 def bandit_factor(percentage) @factor = percentage end
use(options)
click to toggle source
# File lib/fabes/configuration.rb, line 10 def use(options) @database = options[:database] || options [:db] rescue @database = nil end