Class: Pluginator::Autodetect::Finder

Inherits:
Object
  • Object
show all
Defined in:
lib/pluginator/autodetect/finder.rb

Overview

Find plugins

Direct Known Subclasses

FormattedFinder

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(force_prefix, group, force_type) ⇒ Finder

Automatically load plugins for given group (and type)

Parameters:

  • force_prefix (String)

    a prefix for finding plugins if forcing, by default only ‘/lib` is checked, regexp notation is allowed, for example `/[lib|]`

  • group (String)

    name of the plugins group

  • force_type (String)

    name of the plugin type if forcing



35
36
37
38
39
40
41
# File 'lib/pluginator/autodetect/finder.rb', line 35

def initialize(force_prefix, group, force_type)
  @force_prefix = force_prefix
  @group        = group
  @force_type   = force_type
  @pattern      = file_name_pattern
  find_paths
end

Instance Attribute Details

#gem_plugins_pathsObject (readonly)

Returns the value of attribute gem_plugins_paths.



26
27
28
# File 'lib/pluginator/autodetect/finder.rb', line 26

def gem_plugins_paths
  @gem_plugins_paths
end

#load_path_plugins_pathsObject (readonly)

Returns the value of attribute load_path_plugins_paths.



26
27
28
# File 'lib/pluginator/autodetect/finder.rb', line 26

def load_path_plugins_paths
  @load_path_plugins_paths
end

#loaded_plugins_pathObject (readonly)

Returns the value of attribute loaded_plugins_path.



26
27
28
# File 'lib/pluginator/autodetect/finder.rb', line 26

def loaded_plugins_path
  @loaded_plugins_path
end