Module: Logga
- Defined in:
- lib/logga.rb,
lib/logga/config.rb,
lib/logga/version.rb,
lib/logga/active_record.rb
Defined Under Namespace
Modules: ActiveRecord Classes: Config
Constant Summary collapse
- VERSION =
File.read(version_file).split("\n").first
Class Method Summary collapse
- .configuration ⇒ Object
- .configure {|configuration| ... } ⇒ Object
-
.enabled=(value) ⇒ Object
Switches Logga on or off.
-
.enabled? ⇒ Boolean
Returns ‘true` if Logga is on, `false` otherwise.
- .version ⇒ Object
Class Method Details
.configuration ⇒ Object
17 18 19 |
# File 'lib/logga.rb', line 17 def configuration @configuration ||= Config.new end |
.configure {|configuration| ... } ⇒ Object
21 22 23 |
# File 'lib/logga.rb', line 21 def configure yield(configuration) end |
.enabled=(value) ⇒ Object
Switches Logga on or off
26 27 28 |
# File 'lib/logga.rb', line 26 def enabled=(value) configuration.enabled = value end |
.enabled? ⇒ Boolean
Returns ‘true` if Logga is on, `false` otherwise
31 32 33 |
# File 'lib/logga.rb', line 31 def enabled? !!configuration.enabled end |