Class: Neovim::DslBase::Plugins
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #get_handler(name) ⇒ Object
-
#initialize(type, setup_blocks, handlers) ⇒ Plugins
constructor
A new instance of Plugins.
- #options ⇒ Object
- #setup(client) ⇒ Object
- #specs ⇒ Object
Constructor Details
#initialize(type, setup_blocks, handlers) ⇒ Plugins
Returns a new instance of Plugins.
58 59 60 |
# File 'lib/neovim/handler.rb', line 58 def initialize type, setup_blocks, handlers @type, @setup_blocks, @handlers = type, setup_blocks, handlers end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
56 57 58 |
# File 'lib/neovim/handler.rb', line 56 def type @type end |
Instance Method Details
#get_handler(name) ⇒ Object
66 67 68 |
# File 'lib/neovim/handler.rb', line 66 def get_handler name @handlers[ name] end |
#options ⇒ Object
74 75 76 |
# File 'lib/neovim/handler.rb', line 74 def @handlers.each { |name,handler| yield name, handler. } end |
#setup(client) ⇒ Object
62 63 64 |
# File 'lib/neovim/handler.rb', line 62 def setup client @setup_blocks.each { |b| b.call client } end |
#specs ⇒ Object
70 71 72 |
# File 'lib/neovim/handler.rb', line 70 def specs @handlers.map { |_,handler| handler.spec } end |