Sha256: 2e6abd5e56dd4dab5ceb2ebfb65f2bb21466f43181b3b97c743bc48a241c5fa3

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 KB

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

  class InstallerNotFoundError < 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.2.0 lib/vimmer.rb