Class: Entraceable::Preference
- Inherits:
-
Object
- Object
- Entraceable::Preference
- Defined in:
- lib/entraceable_preference.rb
Instance Attribute Summary collapse
-
#default_level ⇒ Object
Returns the value of attribute default_level.
Instance Method Summary collapse
- #disable ⇒ Object
- #enable ⇒ Object
- #enabled? ⇒ Boolean
-
#initialize ⇒ Preference
constructor
A new instance of Preference.
Constructor Details
#initialize ⇒ Preference
Returns a new instance of Preference.
7 8 9 10 |
# File 'lib/entraceable_preference.rb', line 7 def initialize @default_level = :debug @enabled = Rails.env.development? end |
Instance Attribute Details
#default_level ⇒ Object
Returns the value of attribute default_level.
5 6 7 |
# File 'lib/entraceable_preference.rb', line 5 def default_level @default_level end |
Instance Method Details
#disable ⇒ Object
12 13 14 |
# File 'lib/entraceable_preference.rb', line 12 def disable @enabled = false end |
#enable ⇒ Object
16 17 18 |
# File 'lib/entraceable_preference.rb', line 16 def enable @enabled = true end |
#enabled? ⇒ Boolean
20 21 22 |
# File 'lib/entraceable_preference.rb', line 20 def enabled? @enabled end |