Class: FolderExtension

Inherits:
Extension show all
Defined in:
lib/yodel/application/extension.rb

Instance Attribute Summary

Attributes inherited from Extension

#layouts_dir, #lib_dir, #migrations_dir, #models_dir, #name, #public_dir

Instance Method Summary collapse

Methods inherited from Extension

#load!

Constructor Details

#initialize(path) ⇒ FolderExtension

Returns a new instance of FolderExtension.



50
51
52
53
54
# File 'lib/yodel/application/extension.rb', line 50

def initialize(path)
  @name = File.basename(path)
  @lib_dir = File.join(path, Yodel::EXTENSION_LIB_DIRECTORY_NAME)
  super()
end

Instance Method Details

#require_extensionObject



56
57
58
# File 'lib/yodel/application/extension.rb', line 56

def require_extension
  require File.join(@lib_dir, @name)
end