Class: Avo::Plugin
- Inherits:
-
Object
- Object
- Avo::Plugin
- Defined in:
- lib/avo/plugin.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(&block) ⇒ Plugin
constructor
A new instance of Plugin.
Constructor Details
#initialize(&block) ⇒ Plugin
Returns a new instance of Plugin.
3 4 |
# File 'lib/avo/plugin.rb', line 3 def initialize(*, **, &block) end |
Class Method Details
.engine ⇒ Object
15 16 17 |
# File 'lib/avo/plugin.rb', line 15 def engine "#{namespace}::Engine".safe_constantize end |
.gemspec ⇒ Object
25 26 27 28 29 |
# File 'lib/avo/plugin.rb', line 25 def gemspec gemspec_path = Dir["#{engine.root}/*.gemspec"].first Gem::Specification::load(gemspec_path) end |
.name ⇒ Object
7 8 9 |
# File 'lib/avo/plugin.rb', line 7 def name gemspec.name end |
.namespace ⇒ Object
19 20 21 22 23 |
# File 'lib/avo/plugin.rb', line 19 def namespace modules = to_s.split("::") modules.pop modules.join("::") end |
.version ⇒ Object
11 12 13 |
# File 'lib/avo/plugin.rb', line 11 def version "#{namespace}::VERSION".safe_constantize end |