Class: ActiveResource::Base

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

Class Method Summary collapse

Class Method Details

.connection_with_breadboard(refresh = false) ⇒ Object



49
50
51
52
53
54
# File 'lib/breadboard/breadboard.rb', line 49

def connection_with_breadboard(refresh = false)
  # setting @connection = nil would trigger Connection.new(site...
  # @connection is set to nil when calling self.site = 'url' as well
  @connection = nil
  connection_without_breadboard
end

.site_with_breadboardObject



36
37
38
39
40
41
42
43
44
45
# File 'lib/breadboard/breadboard.rb', line 36

def site_with_breadboard
  if defined?(BREAD_BOARD)
    unless @site 
      self.site = BREAD_BOARD.service_for(self)
    end
    @site
  else
    self.site_without_breadboard
  end
end