Class: Vedeu::Runtime::Flags
- Inherits:
-
Object
- Object
- Vedeu::Runtime::Flags
- Includes:
- Singleton
- Defined in:
- lib/vedeu/runtime/flags.rb
Overview
Home of various runtime flags which Vedeu uses.
Instance Attribute Summary collapse
Class Method Summary collapse
- .ready! ⇒ Boolean
- .ready? ⇒ Boolean
-
.reset ⇒ Hash
Reset the flags to the default values.
-
.reset! ⇒ Hash
Reset the flags to the default values.
Instance Method Summary collapse
- #defaults ⇒ Hash private
-
#initialize ⇒ Vedeu::Runtime::Flags
constructor
Create a new singleton instance of Vedeu::Runtime::Flags.
- #reset! ⇒ Hash (also: #reset)
Constructor Details
#initialize ⇒ Vedeu::Runtime::Flags
Create a new singleton instance of Vedeu::Runtime::Flags.
44 45 46 |
# File 'lib/vedeu/runtime/flags.rb', line 44 def initialize self. = defaults end |
Instance Attribute Details
#options ⇒ Hash
39 40 41 |
# File 'lib/vedeu/runtime/flags.rb', line 39 def end |
Class Method Details
.ready! ⇒ Boolean
16 17 18 19 20 |
# File 'lib/vedeu/runtime/flags.rb', line 16 def ready! Vedeu.log(message: 'Vedeu ready!') instance.[:ready] = true end |
.ready? ⇒ Boolean
23 24 25 |
# File 'lib/vedeu/runtime/flags.rb', line 23 def ready? instance.[:ready] end |
.reset ⇒ Hash
Reset the flags to the default values.
33 34 35 |
# File 'lib/vedeu/runtime/flags.rb', line 33 def reset! instance.reset! end |
.reset! ⇒ Hash
Reset the flags to the default values.
30 31 32 |
# File 'lib/vedeu/runtime/flags.rb', line 30 def reset! instance.reset! end |
Instance Method Details
#defaults ⇒ Hash (private)
57 58 59 60 61 |
# File 'lib/vedeu/runtime/flags.rb', line 57 def defaults { ready: false, } end |
#reset! ⇒ Hash Also known as: reset
49 50 51 |
# File 'lib/vedeu/runtime/flags.rb', line 49 def reset! self. = defaults end |