Class: Neovim::DslBase::Plugins

Inherits:
Object
  • Object
show all
Defined in:
lib/neovim/handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#typeObject (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

#optionsObject



74
75
76
# File 'lib/neovim/handler.rb', line 74

def options
  @handlers.each { |name,handler| yield name, handler.options }
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

#specsObject



70
71
72
# File 'lib/neovim/handler.rb', line 70

def specs
  @handlers.map { |_,handler| handler.spec }
end