Module: Tanshuku
- Defined in:
- lib/tanshuku.rb,
lib/tanshuku/engine.rb,
lib/tanshuku/version.rb,
app/models/tanshuku/url.rb,
lib/tanshuku/configuration.rb,
app/controllers/tanshuku/urls_controller.rb,
lib/generators/tanshuku/install_generator.rb
Overview
Tanshuku’s namespace.
Defined Under Namespace
Classes: Configuration, Engine, InstallGenerator, Url, UrlsController
Constant Summary collapse
- VERSION =
"3.0.3"
Class Method Summary collapse
-
.config ⇒ Tanshuku::Configuration
Returns a configuration object for Tanshuku.
-
.configure {|config| ... } ⇒ void
Configures Tanshuku.
Class Method Details
.config ⇒ Tanshuku::Configuration
Note:
Mutating a Configuration object is thread-unsafe. It is recommended to use configure for configuration.
Returns a configuration object for Tanshuku.
16 17 18 19 20 21 |
# File 'lib/tanshuku.rb', line 16 def self.config # Disable this cop but use `Tanshuku::Configuration#configure` for thread-safety. # rubocop:disable ThreadSafety/InstanceVariableInClassMethod @config ||= Configuration.new # rubocop:enable ThreadSafety/InstanceVariableInClassMethod end |
.configure {|config| ... } ⇒ void
Note:
This method is thread-safe. When mutating a Configuration object for configuration, it is recommended to use this method.
This method returns an undefined value.
Configures Tanshuku.
38 39 40 |
# File 'lib/tanshuku.rb', line 38 def self.configure(&) config.configure(&) end |