Sha256: eb7af243d4ffa16fc7340be447d6995686b8ef8da6e8f9688e43741c63ffdb8c

Contents?: true

Size: 727 Bytes

Versions: 14

Compression:

Stored size: 727 Bytes

Contents

module Praxis

  # one instance is created per use.
  class Plugin

    attr_accessor :application
    attr_accessor :block
    attr_accessor :config
    attr_accessor :config_attribute

    def options
      @options ||= {}
    end

    def config_key
    end

    def prepare_config!(node)
    end

    def load_config!
      return unless options.has_key?(:config_file)
      return {} unless (application.root + options[:config_file]).exist?

      YAML.load_file(application.root + options[:config_file])
    end

    def setup!
    end

    def after(stage,&block)
      application.bootloader.after(stage,&block)
    end

    def before(stage,&block)
      application.bootloader.before(stage,&block)
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
praxis-0.19.0 lib/praxis/plugin.rb
praxis-0.18.1 lib/praxis/plugin.rb
praxis-0.18.0 lib/praxis/plugin.rb
praxis-0.17.1 lib/praxis/plugin.rb
praxis-0.17.0 lib/praxis/plugin.rb
praxis-0.16.1 lib/praxis/plugin.rb
praxis-0.16.0 lib/praxis/plugin.rb
praxis-0.15.0 lib/praxis/plugin.rb
praxis-0.14.0 lib/praxis/plugin.rb
praxis-0.13.0 lib/praxis/plugin.rb
praxis-0.11.2 lib/praxis/plugin.rb
praxis-0.11.1 lib/praxis/plugin.rb
praxis-0.11 lib/praxis/plugin.rb
praxis-0.11pre lib/praxis/plugin.rb