Module: Photostat::Plugins
- Defined in:
- lib/photostat/plugins/00_base.rb
Defined Under Namespace
Classes: Base
Class Method Summary collapse
Class Method Details
.all ⇒ Object
11 12 13 14 15 16 |
# File 'lib/photostat/plugins/00_base.rb', line 11 def self.all unless @plugins @plugins ||= {} end @plugins end |
.all_in_order ⇒ Object
4 5 6 7 8 9 |
# File 'lib/photostat/plugins/00_base.rb', line 4 def self.all_in_order unless @plugins_ordered @plugins_ordered ||= [] end @plugins_ordered end |
.load_all! ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/photostat/plugins/00_base.rb', line 18 def self.load_all! # loads all available plugins Photostat.root.join('plugins').children.sort.each do |plugin_path| next if File.directory? plugin_path next unless plugin_path.to_s =~ /\/\d+_\w+.rb$/ next unless File.basename(plugin_path) != '00_base.rb' require plugin_path.to_s end end |