Class: LogMaster::Configuration
- Inherits:
-
Object
- Object
- LogMaster::Configuration
- Includes:
- Singleton
- Defined in:
- lib/log_master/configuration.rb
Constant Summary collapse
- @@configured =
false
Instance Attribute Summary collapse
-
#failure_conditions ⇒ Object
Returns the value of attribute failure_conditions.
-
#from ⇒ Object
These are options that directly affect the email.
-
#recipients ⇒ Object
These are options that directly affect the email.
-
#reply_to ⇒ Object
These are options that directly affect the email.
-
#reporting ⇒ Object
Returns the value of attribute reporting.
-
#title ⇒ Object
Returns the value of attribute title.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #reset ⇒ Object
-
#reset_configured_status! ⇒ Object
For testing purposes.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
14 15 16 |
# File 'lib/log_master/configuration.rb', line 14 def initialize reset end |
Instance Attribute Details
#failure_conditions ⇒ Object
Returns the value of attribute failure_conditions.
7 8 9 |
# File 'lib/log_master/configuration.rb', line 7 def failure_conditions @failure_conditions end |
#from ⇒ Object
These are options that directly affect the email
10 11 12 |
# File 'lib/log_master/configuration.rb', line 10 def from @from end |
#recipients ⇒ Object
These are options that directly affect the email
10 11 12 |
# File 'lib/log_master/configuration.rb', line 10 def recipients @recipients end |
#reply_to ⇒ Object
These are options that directly affect the email
10 11 12 |
# File 'lib/log_master/configuration.rb', line 10 def reply_to @reply_to end |
#reporting ⇒ Object
Returns the value of attribute reporting.
7 8 9 |
# File 'lib/log_master/configuration.rb', line 7 def reporting @reporting end |
#title ⇒ Object
Returns the value of attribute title.
7 8 9 |
# File 'lib/log_master/configuration.rb', line 7 def title @title end |
Class Method Details
.configure {|instance| ... } ⇒ Object
26 27 28 29 |
# File 'lib/log_master/configuration.rb', line 26 def self.configure yield instance @@configured = true end |
.configured? ⇒ Boolean
31 32 33 |
# File 'lib/log_master/configuration.rb', line 31 def self.configured? @@configured === true end |
Instance Method Details
#reset ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/log_master/configuration.rb', line 18 def reset @title = "No Title" @reporting = {} @failure_conditions = [] @@configured = false end |
#reset_configured_status! ⇒ Object
For testing purposes
36 37 38 |
# File 'lib/log_master/configuration.rb', line 36 def reset_configured_status! @@configured = false end |