Module: Nydp::PluginHelper

Included in:
Core
Defined in:
lib/nydp/plugin.rb

Instance Method Summary collapse

Instance Method Details

#base_pathObject

override this to provide common prefix for plugin filenames



9
# File 'lib/nydp/plugin.rb', line 9

def base_path ; "" ; end

#file_readers(filenames, bp = base_path) ⇒ Object



11
12
13
# File 'lib/nydp/plugin.rb', line 11

def file_readers filenames, bp=base_path
  filenames.map { |f| Nydp::FileReader.new(f.gsub(bp, ""), f) }
end

#relative_path(name) ⇒ Object



15
16
17
18
# File 'lib/nydp/plugin.rb', line 15

def relative_path name
  # File.join File.expand_path(File.dirname(__FILE__)), name
  File.join File.expand_path(File.dirname(caller[0].split(/:\d+:/)[0])), name
end