Class: Zwite::Plugin

Inherits:
Object show all
Defined in:
lib/zwite/core/plugin.rb

Direct Known Subclasses

Appcast, Blog::Blog, Compass, StaticFiles

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#appObject

properties



9
10
11
# File 'lib/zwite/core/plugin.rb', line 9

def app
  @app
end

#enabledObject (readonly)

Returns the value of attribute enabled.



11
12
13
# File 'lib/zwite/core/plugin.rb', line 11

def enabled
  @enabled
end

#nameObject (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

.subclassesObject



25
26
27
28
# File 'lib/zwite/core/plugin.rb', line 25

def self.subclasses
  @subclasses ||= []
  return @subclasses
end

Instance Method Details

#enabled?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/zwite/core/plugin.rb', line 13

def enabled?
  return (self.app.path + self.name).exist?
end

#generateObject



45
46
# File 'lib/zwite/core/plugin.rb', line 45

def generate
end

#preprocessObject

actions



42
43
# File 'lib/zwite/core/plugin.rb', line 42

def preprocess
end