Class: Vedeu::Runtime::Flags Private
- Inherits:
-
Object
- Object
- Vedeu::Runtime::Flags
- Includes:
- Singleton
- Defined in:
- lib/vedeu/runtime/flags.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Home of various runtime flags which Vedeu uses.
Instance Attribute Summary collapse
Class Method Summary collapse
- .ready! ⇒ Boolean private
- .ready? ⇒ Boolean private
-
.reset ⇒ Hash
private
Reset the flags to the default values.
-
.reset! ⇒ Hash
private
Reset the flags to the default values.
Instance Method Summary collapse
-
#defaults ⇒ Hash<Symbol => void>
private
private
The default options/attributes for a new instance of this class.
-
#initialize ⇒ Vedeu::Runtime::Flags
constructor
private
Create a new singleton instance of Vedeu::Runtime::Flags.
- #reset! ⇒ Hash (also: #reset) private
Constructor Details
#initialize ⇒ Vedeu::Runtime::Flags
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create a new singleton instance of Vedeu::Runtime::Flags.
46 47 48 |
# File 'lib/vedeu/runtime/flags.rb', line 46 def initialize self. = defaults end |
Instance Attribute Details
#options ⇒ Hash
41 42 43 |
# File 'lib/vedeu/runtime/flags.rb', line 41 def @options end |
Class Method Details
.ready! ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 21 22 |
# File 'lib/vedeu/runtime/flags.rb', line 18 def ready! Vedeu.log(message: 'Vedeu ready!') instance.[:ready] = true end |
.ready? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 |
# File 'lib/vedeu/runtime/flags.rb', line 25 def ready? instance.[:ready] end |
.reset ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Reset the flags to the default values.
35 36 37 |
# File 'lib/vedeu/runtime/flags.rb', line 35 def reset! instance.reset! end |
.reset! ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Reset the flags to the default values.
32 33 34 |
# File 'lib/vedeu/runtime/flags.rb', line 32 def reset! instance.reset! end |
Instance Method Details
#defaults ⇒ Hash<Symbol => void> (private)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The default options/attributes for a new instance of this class.
59 60 61 62 63 |
# File 'lib/vedeu/runtime/flags.rb', line 59 def defaults { ready: false, } end |
#reset! ⇒ Hash Also known as: reset
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
51 52 53 |
# File 'lib/vedeu/runtime/flags.rb', line 51 def reset! self. = defaults end |