Module: Loaf

Defined in:
lib/loaf/errors.rb,
lib/loaf.rb,
lib/loaf/crumb.rb,
lib/loaf/builder.rb,
lib/loaf/railtie.rb,
lib/loaf/version.rb,
lib/loaf/translation.rb,
lib/loaf/configuration.rb,
lib/loaf/view_extensions.rb,
lib/loaf/crumb_formatter.rb,
lib/loaf/options_validator.rb,
lib/loaf/controller_extensions.rb,
lib/generators/loaf/install_generator.rb

Overview

:nodoc:

Defined Under Namespace

Modules: ControllerExtensions, CrumbFormatter, Generators, OptionsValidator, Translation, ViewExtensions Classes: Builder, Configuration, Crumb, InvalidOptions, LoafError, Railtie

Constant Summary collapse

VERSION =
'0.5.0'

Class Method Summary collapse

Class Method Details

.configurationObject

Get global configuration


25
26
27
# File 'lib/loaf.rb', line 25

def self.configuration
  @configuration ||= Configuration.new
end

.configuration=(config) ⇒ Object

Set global configuration


18
19
20
# File 'lib/loaf.rb', line 18

def self.configuration=(config)
  @configuration = config
end

.configure {|configuration| ... } ⇒ Object

Sets the Loaf configuration options. Best used by passing a block.

Loaf.configure do |config|

config.capitalize = true

end

Yields:


34
35
36
# File 'lib/loaf.rb', line 34

def self.configure
  yield configuration
end