Class: NvimConf::Managers::Globals
- Inherits:
-
Object
- Object
- NvimConf::Managers::Globals
- Defined in:
- lib/nvim_conf/managers/globals.rb
Instance Attribute Summary collapse
-
#globals ⇒ Object
readonly
Returns the value of attribute globals.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Globals
constructor
A new instance of Globals.
- #set(name, value = true) ⇒ Object
- #store? ⇒ Boolean
- #unset(name) ⇒ Object
Constructor Details
#initialize ⇒ Globals
Returns a new instance of Globals.
8 9 10 |
# File 'lib/nvim_conf/managers/globals.rb', line 8 def initialize @globals = [] end |
Instance Attribute Details
#globals ⇒ Object (readonly)
Returns the value of attribute globals.
6 7 8 |
# File 'lib/nvim_conf/managers/globals.rb', line 6 def globals @globals end |
Class Method Details
.section_name ⇒ Object
20 21 22 |
# File 'lib/nvim_conf/managers/globals.rb', line 20 def section_name "Globals" end |
Instance Method Details
#set(name, value = true) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/nvim_conf/managers/globals.rb', line 12 def set(name, value = true) store_global( name, value ) end |
#store? ⇒ Boolean
25 26 27 |
# File 'lib/nvim_conf/managers/globals.rb', line 25 def store? @globals.any? end |
#unset(name) ⇒ Object
29 30 31 32 33 34 |
# File 'lib/nvim_conf/managers/globals.rb', line 29 def unset(name) store_global( name, false ) end |