Class: Neovim::Plugin Private
- Inherits:
-
Object
- Object
- Neovim::Plugin
- Defined in:
- lib/neovim/plugin.rb,
lib/neovim/plugin/dsl.rb,
lib/neovim/plugin/handler.rb
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.
Defined Under Namespace
Instance Attribute Summary collapse
- #handlers ⇒ Object private
- #source ⇒ Object readonly private
Class Method Summary collapse
-
.from_config_block(source) ⇒ Object
private
Entrypoint to the
Neovim.plugin
DSL.
Instance Method Summary collapse
-
#initialize(source) ⇒ Plugin
constructor
private
A new instance of Plugin.
-
#specs ⇒ Object
private
Return specs used by
nvim
to register plugins.
Constructor Details
#initialize(source) ⇒ Plugin
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.
Returns a new instance of Plugin.
16 17 18 19 |
# File 'lib/neovim/plugin.rb', line 16 def initialize(source) @handlers = [] @source = source end |
Instance Attribute Details
#handlers ⇒ Object
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.
6 7 8 |
# File 'lib/neovim/plugin.rb', line 6 def handlers @handlers end |
#source ⇒ Object (readonly)
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.
7 8 9 |
# File 'lib/neovim/plugin.rb', line 7 def source @source end |
Class Method Details
.from_config_block(source) ⇒ Object
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.
Entrypoint to the Neovim.plugin
DSL.
10 11 12 13 14 |
# File 'lib/neovim/plugin.rb', line 10 def self.from_config_block(source) new(source).tap do |instance| yield DSL.new(instance) if block_given? end end |
Instance Method Details
#specs ⇒ Object
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.
Return specs used by nvim
to register plugins.
22 23 24 25 26 |
# File 'lib/neovim/plugin.rb', line 22 def specs @handlers.inject([]) do |acc, handler| handler.qualified? ? acc + [handler.to_spec] : acc end end |