Sha256: 048f8b69db64e134577ad053985894d26b312b02a057fdfb8e78d8a0f938753b

Contents?: true

Size: 1009 Bytes

Versions: 1

Compression:

Stored size: 1009 Bytes

Contents

module Vimmer

  autoload :Installers,   'vimmer/installers'
  autoload :Settings,     'vimmer/settings'
  autoload :PluginPath,   'vimmer/plugin_path'
  autoload :Plugin,       'vimmer/plugin'

  class PluginNotFoundError < StandardError; end
  class InvalidPathError < StandardError
    attr_accessor :path

    def initialize(path)
      @path = path
    end

  end

  def bundle_path
    settings[:bundle_path]
  end
  module_function :bundle_path


  def settings
    @settings ||= Settings.new
  end
  module_function :settings


  def add_plugin(name, path)
    settings.add_plugin(name, path)
  end
  module_function :add_plugin


  def remove_plugin(name)
    settings.remove_plugin(name)
  end
  module_function :remove_plugin


  def plugin?(name)
    plugins.key?(name)
  end
  module_function :plugin?

  def plugins
    settings.plugins
  end
  module_function :plugins


  def setup
    settings.create_vimmer_home!
    settings.create_default_config_file!
  end
  module_function :setup


end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vimmer-0.1.0 lib/vimmer.rb