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, #load, #load_paths, #loaded?, #valid?
Constructor Details
#initialize(spec, gem) ⇒ GemPlugin
Initialize this plugin from a Gem::Specification.
106 107 108 109 110 |
# File 'lib/rails/plugin.rb', line 106 def initialize(spec, gem) directory = (gem.frozen? && gem.unpacked_paths.first) || File.join(spec.full_gem_path) super(directory) @name = spec.name end |
Instance Method Details
#init_path ⇒ Object
112 113 114 |
# File 'lib/rails/plugin.rb', line 112 def init_path File.join(directory, 'rails', 'init.rb') end |