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



178
179
180
# File 'lib/locomotive/steam/services.rb', line 178

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

#localeObject



165
166
167
# File 'lib/locomotive/steam/services.rb', line 165

def locale
  @locale || I18n.locale
end

#locale=(locale) ⇒ Object



169
170
171
172
# File 'lib/locomotive/steam/services.rb', line 169

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

#set_site(site) ⇒ Object



174
175
176
# File 'lib/locomotive/steam/services.rb', line 174

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