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, setups, handlers) ⇒ Plugins

Returns a new instance of Plugins.



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

def initialize type, setups, handlers
  @type, @setups, @handlers = type, setups, handlers
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



67
68
69
# File 'lib/neovim/handler.rb', line 67

def type
  @type
end

Instance Method Details

#get_handler(name) ⇒ Object



77
78
79
# File 'lib/neovim/handler.rb', line 77

def get_handler name
  @handlers[ name]
end

#optionsObject



85
86
87
# File 'lib/neovim/handler.rb', line 85

def options
  @handlers.each { |name,handler| yield name, handler.options }
end

#setup(client) ⇒ Object



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

def setup client
  @setups.each { |b| b.call client }
end

#specsObject



81
82
83
# File 'lib/neovim/handler.rb', line 81

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