Class: NvimConf::Managers::Globals

Inherits:
Object
  • Object
show all
Defined in:
lib/nvim_conf/managers/globals.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGlobals

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

#globalsObject (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_nameObject



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

Returns:

  • (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