Class Opensteam::ExtensionBase::Extension
In: lib/opensteam/extension_base.rb
Parent: ActiveRecord::Base

Extension-Model

Methods

Public Instance methods

activate the extension

[Source]

    # File lib/opensteam/extension_base.rb, line 47
47:       def activate! ; self.update_attribute( :active, 1 ) ; end

[Source]

    # File lib/opensteam/extension_base.rb, line 44
44:       def active? ; active == 0 ? false : true ; end

deactivate the extension

[Source]

    # File lib/opensteam/extension_base.rb, line 50
50:       def deactivate! ; self.update_attribute( :active, 0 ) ; end

verify the extension-path if path doesn‘t exist, set error and deactivate extension if path exist, delete previous error-message.

[Source]

    # File lib/opensteam/extension_base.rb, line 56
56:       def verify_path
57:         if File.exists?( self.path )
58:           self.error = nil
59:           self.save
60:         else
61:           self.error = "Extensions-Path '#{self.path}' not found!"
62:           self.deactivate!
63:         end
64:       end

[Validate]