Class: Zwite::Plugin
Direct Known Subclasses
Instance Attribute Summary collapse
-
#app ⇒ Object
properties.
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
-
.inherited(base_class) ⇒ Object
class methods.
- .subclasses ⇒ Object
Instance Method Summary collapse
- #enabled? ⇒ Boolean
- #generate ⇒ Object
-
#initialize(app) ⇒ Plugin
constructor
initialization.
-
#preprocess ⇒ Object
actions.
Constructor Details
#initialize(app) ⇒ Plugin
initialization
34 35 36 |
# File 'lib/zwite/core/plugin.rb', line 34 def initialize(app) self.app = app end |
Instance Attribute Details
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
11 12 13 |
# File 'lib/zwite/core/plugin.rb', line 11 def enabled @enabled end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/zwite/core/plugin.rb', line 10 def name @name end |
Class Method Details
.inherited(base_class) ⇒ Object
class methods
21 22 23 |
# File 'lib/zwite/core/plugin.rb', line 21 def self.inherited(base_class) self.subclasses << base_class end |
.subclasses ⇒ Object
25 26 27 28 |
# File 'lib/zwite/core/plugin.rb', line 25 def self.subclasses @subclasses ||= [] return @subclasses end |
Instance Method Details
#enabled? ⇒ Boolean
13 14 15 |
# File 'lib/zwite/core/plugin.rb', line 13 def enabled? return (self.app.path + self.name).exist? end |
#generate ⇒ Object
45 46 |
# File 'lib/zwite/core/plugin.rb', line 45 def generate end |