Class: Rails::GemPlugin
Overview
This Plugin subclass represents a Gem plugin. Although RubyGems has already taken care of $LOAD_PATHs, it exposes its load_paths to add them to Dependencies.load_paths.
Instance Attribute Summary
Attributes inherited from Plugin
Instance Method Summary collapse
- #init_path ⇒ Object
-
#initialize(spec, gem) ⇒ GemPlugin
constructor
Initialize this plugin from a Gem::Specification.
Methods inherited from Plugin
#<=>, #about, #controller_path, #engine?, #load, #load_paths, #loaded?, #locale_files, #locale_path, #localized?, #metal_path, #routed?, #routing_file, #valid?, #view_path
Constructor Details
#initialize(spec, gem) ⇒ GemPlugin
Initialize this plugin from a Gem::Specification.
169 170 171 172 173 |
# File 'lib/rails/plugin.rb', line 169 def initialize(spec, gem) directory = spec.full_gem_path super(directory) @name = spec.name end |
Instance Method Details
#init_path ⇒ Object
175 176 177 |
# File 'lib/rails/plugin.rb', line 175 def init_path File.join(directory, 'rails', 'init.rb') end |