Class: NvimConf::Managers::Plugins

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, title, bootstraped: false) ⇒ Plugins

Returns a new instance of Plugins.



8
9
10
11
12
13
# File 'lib/nvim_conf/managers/plugins.rb', line 8

def initialize(name, title, bootstraped: false)
  @name = name
  @title = title
  @bootstraped = bootstraped
  @plugins = []
end

Instance Attribute Details

#bootstrapedObject (readonly)

Returns the value of attribute bootstraped.



6
7
8
# File 'lib/nvim_conf/managers/plugins.rb', line 6

def bootstraped
  @bootstraped
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/nvim_conf/managers/plugins.rb', line 6

def name
  @name
end

#pluginsObject (readonly)

Returns the value of attribute plugins.



6
7
8
# File 'lib/nvim_conf/managers/plugins.rb', line 6

def plugins
  @plugins
end

#titleObject (readonly)

Returns the value of attribute title.



6
7
8
# File 'lib/nvim_conf/managers/plugins.rb', line 6

def title
  @title
end

Class Method Details

.section_nameObject



16
17
18
# File 'lib/nvim_conf/managers/plugins.rb', line 16

def section_name
  "Plugins"
end

Instance Method Details

#plug(name, **params) ⇒ Object



25
26
27
28
29
30
# File 'lib/nvim_conf/managers/plugins.rb', line 25

def plug(name, **params)
  store_plugin(
    name,
    params
  )
end

#store?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/nvim_conf/managers/plugins.rb', line 21

def store?
  @plugins.any?
end