Class: Locomotive::Steam::Services::Instance

Inherits:
Object
  • Object
show all
Includes:
Morphine
Defined in:
lib/locomotive/steam/services.rb

Instance Method Summary collapse

Instance Method Details

#defer(name, &block) ⇒ Object



154
155
156
# File 'lib/locomotive/steam/services.rb', line 154

def defer(name, &block)
  send(:"#{name}=", Defer.new(&block))
end

#localeObject



141
142
143
# File 'lib/locomotive/steam/services.rb', line 141

def locale
  @locale || I18n.locale
end

#locale=(locale) ⇒ Object



145
146
147
148
# File 'lib/locomotive/steam/services.rb', line 145

def locale=(locale)
  # Note: "repositories" has already been initialized when called here.
  @locale = repositories.locale = locale
end

#set_site(site) ⇒ Object



150
151
152
# File 'lib/locomotive/steam/services.rb', line 150

def set_site(site)
  self.current_site.__setobj__(site)
end