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



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

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

#localeObject



133
134
135
# File 'lib/locomotive/steam/services.rb', line 133

def locale
  @locale || I18n.locale
end

#locale=(locale) ⇒ Object



137
138
139
140
# File 'lib/locomotive/steam/services.rb', line 137

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

#set_site(site) ⇒ Object



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

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