class LibraryLoader
Public Class Methods
new(client)
click to toggle source
Calls superclass method
# File lib/shot_libs/library_loader.rb, line 26 def initialize(client) super(client) @type = 'library' end
Public Instance Methods
get(library_name)
click to toggle source
# File lib/shot_libs/library_loader.rb, line 31 def get(library_name) if helper_exists helper load "./application/libraries/#{library_name.underscore}.rb" else raise LibraryLoadException "Could not find library #{library_name}. Please verify it exists at application/libraries/#{library_name.underscore}.rb" end end
Private Instance Methods
helper_exits(helper)
click to toggle source
# File lib/shot_libs/library_loader.rb, line 41 def helper_exits(helper) Dir.exists? 'application/libraries' and File.exists? "application/libraries/#{helper.underscore}.rb" end