module BestBoy
Constants
- VERSION
Public Class Methods
in_real_mode(&block)
click to toggle source
# File lib/best_boy.rb, line 28 def self.in_real_mode(&block) execute_with_test_mode_set_to(false, &block) end
in_test_mode(&block)
click to toggle source
# File lib/best_boy.rb, line 24 def self.in_test_mode(&block) execute_with_test_mode_set_to(true, &block) end
setup() { |self| ... }
click to toggle source
Load configuration from initializer
# File lib/best_boy.rb, line 20 def self.setup yield self end
Private Class Methods
execute_with_test_mode_set_to(test_mode, &block)
click to toggle source
# File lib/best_boy.rb, line 34 def self.execute_with_test_mode_set_to(test_mode, &block) Mutex.new.synchronize do test_mode_before = self.test_mode self.test_mode = test_mode block.call if block.present? self.test_mode = test_mode_before end end