Module: Hoodie
- Defined in:
- lib/hoodie/version.rb,
lib/hoodie.rb,
lib/hoodie/stash.rb,
lib/hoodie/logging.rb,
lib/hoodie/utils/os.rb,
lib/hoodie/utils/ansi.rb,
lib/hoodie/inflections.rb,
lib/hoodie/utils/retry.rb,
lib/hoodie/utils/crypto.rb,
lib/hoodie/configuration.rb,
lib/hoodie/utils/machine.rb,
lib/hoodie/utils/timeout.rb,
lib/hoodie/stash/mem_store.rb,
lib/hoodie/utils/equalizer.rb,
lib/hoodie/stash/disk_store.rb,
lib/hoodie/stash/memoizable.rb,
lib/hoodie/utils/url_helper.rb,
lib/hoodie/utils/file_helper.rb,
lib/hoodie/utils/konstruktor.rb,
lib/hoodie/inflections/inflections.rb,
lib/hoodie/inflections/rules_collection.rb
Overview
Author: Stefano Harding <[email protected]> License: Apache License, Version 2.0 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: ANSI, Crypto, FileHelper, Inflections, Konstruktor, Let, Logging, Memoizable, OS, Retry, Timeout, UrlHelper Classes: Configuration, Equalizer, Formatter, Machine, MemStash, Stash, TransitionTable
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 =
'1.0.1'
Class Method Summary collapse
-
.config {|configuration| ... } ⇒ Configuration
Provides access to the global configuration.
-
.configuration ⇒ Configuration
The global configuration instance.
- .Constructor(*names) ⇒ Object
-
.logging ⇒ Boolean
The global logging setting.
- .logging=(value) ⇒ Hoodie
Class Method Details
.config {|configuration| ... } ⇒ Configuration
Provides access to the global configuration.
64 65 66 67 |
# File 'lib/hoodie.rb', line 64 def self.config(&block) yield configuration if block_given? configuration end |
.configuration ⇒ Configuration
Returns The global configuration instance.
72 73 74 |
# File 'lib/hoodie.rb', line 72 def self.configuration @configuration ||= Configuration.new end |
.Constructor(*names) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/hoodie/utils/konstruktor.rb', line 56 def self.Constructor(*names) eval "\n Module.new do\n def initialize(\#{names.join(', ')})\n \#{names.map{ |name| \"@\#{name} = \#{name}\" }.join(\"\\n\") }\n end\n end\n\n RUBY\nend\n" |
.logging ⇒ Boolean
Returns The global logging setting.
51 52 53 |
# File 'lib/hoodie.rb', line 51 def self.logging configuration.logging end |
.logging=(value) ⇒ Hoodie
43 44 45 46 |
# File 'lib/hoodie.rb', line 43 def self.logging=(value) configuration.logging = value self end |