Module: Hoodie
- Defined in:
- lib/hoodie/proxy.rb,
lib/hoodie.rb,
lib/hoodie/utils.rb,
lib/hoodie/logging.rb,
lib/hoodie/version.rb,
lib/hoodie/obfuscate.rb,
lib/hoodie/inflections.rb,
lib/hoodie/identity_map.rb,
lib/hoodie/configuration.rb,
lib/hoodie/inflections/inflections.rb,
lib/hoodie/inflections/rules_collection.rb
Overview
Author: Stefano Harding <[email protected]>
Copyright © 2014-2015 Stefano Harding
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Defined Under Namespace
Modules: IdentityMap, Inflections, Logging, Obfuscate, Timers, Utils Classes: Configuration, Formatter, Proxy
Constant Summary collapse
- ConfigurationError =
Raised when errors occur during configuration.
Class.new(StandardError)
- InitializationError =
Raised when an object’s methods are called when it has not been properly initialized.
Class.new(StandardError)
- TimeoutError =
Raised when an operation times out.
Class.new(StandardError)
- VERSION =
'0.5.4'
Class Method Summary collapse
-
.config {|configuration| ... } ⇒ Configuration
Provides access to the global configuration.
-
.configuration ⇒ Configuration
private
Global configuration instance.
-
.logging ⇒ TrueClass, FalseClass
The global logging setting.
- .logging=(value) ⇒ Hoodie
Class Method Details
.config {|configuration| ... } ⇒ Configuration
Provides access to the global configuration.
59 60 61 62 |
# File 'lib/hoodie.rb', line 59 def config(&block) yield configuration if block_given? configuration end |
.configuration ⇒ Configuration
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns global configuration instance.
66 67 68 |
# File 'lib/hoodie.rb', line 66 def configuration @configuration ||= Configuration.new end |
.logging ⇒ TrueClass, FalseClass
Returns the global logging setting.
45 46 47 |
# File 'lib/hoodie.rb', line 45 def logging configuration.logging end |
.logging=(value) ⇒ Hoodie
38 39 40 41 |
# File 'lib/hoodie.rb', line 38 def logging=(value) configuration.logging = value self end |