Class: HelperLoader
- Inherits:
-
Loader
- Object
- Loader
- HelperLoader
- Defined in:
- lib/shot_libs/helper_loader.rb
Instance Method Summary collapse
- #get(helper_name) ⇒ Object
-
#initialize(client) ⇒ HelperLoader
constructor
A new instance of HelperLoader.
Constructor Details
#initialize(client) ⇒ HelperLoader
26 27 28 29 |
# File 'lib/shot_libs/helper_loader.rb', line 26 def initialize(client) super(client) @type = 'helper' end |
Instance Method Details
#get(helper_name) ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/shot_libs/helper_loader.rb', line 31 def get(helper_name) if helper_exists? helper_name load "./application/helpers/#{helper_name.underscore}.rb" else raise HelperLoadException "Could not find helper #{helper_name}. Please verify it exists at application/helpers/#{helper_name.underscore}.rb" end end |