Module: Ravioli
- Defined in:
- lib/ravioli.rb,
lib/ravioli/builder.rb,
lib/ravioli/railtie.rb,
lib/ravioli/version.rb,
lib/ravioli/configuration.rb,
lib/ravioli/staging_inquirer.rb
Overview
The root namespace for all of Ravioli, and owner of two handly configuration-related class methods
Defined Under Namespace
Modules: RailsConfig, StagingInquirer Classes: BuildError, Builder, Configuration, KeyMissingError, ParseError, Railtie
Constant Summary collapse
- VERSION =
"0.2.6"
Class Method Summary collapse
-
.build(namespace: nil, class_name: "Configuration", strict: false) {|builder| ... } ⇒ Object
Forwards arguments to a Builder.
-
.configurations ⇒ Object
Returns a list of all of the configuration instances.
-
.default ⇒ Object
Returns the most-recently configured Ravioli instance that has been built with build.
Class Method Details
.build(namespace: nil, class_name: "Configuration", strict: false) {|builder| ... } ⇒ Object
Forwards arguments to a Builder. See Ravioli::Builder#new for complete documentation.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/ravioli.rb', line 20 def build(namespace: nil, class_name: "Configuration", strict: false, &block) builder = Builder.new( class_name: class_name, hijack: true, namespace: namespace, strict: strict, ) yield builder if block builder.build! end |
.configurations ⇒ Object
Returns a list of all of the configuration instances
32 33 34 |
# File 'lib/ravioli.rb', line 32 def configurations @configurations ||= [] end |
.default ⇒ Object
Returns the most-recently configured Ravioli instance that has been built with build.
37 38 39 |
# File 'lib/ravioli.rb', line 37 def default configurations.last end |