Sha256: 9c1b270f478a59b43c5bac1a2db7f80095e60c4c85fd061aca592fbb010f3962

Contents?: true

Size: 556 Bytes

Versions: 20

Compression:

Stored size: 556 Bytes

Contents

# Should implement methods:
#    defaults
#    provider
module Terraspace::Plugin::Config
  module Interface
    include DslEvaluator

    attr_reader :config
    def initialize
      @config = defaults # plugin should implement defaults
    end

    # meant to be overridden by plugin
    def defaults
      ActiveSupport::OrderedOptions.new
    end

    def load_project_config
      project_config = "#{Terraspace.root}/config/plugins/#{provider}.rb"
      evaluate_file(project_config)
    end

    def configure
      yield(@config)
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
terraspace-0.4.4 lib/terraspace/plugin/config/interface.rb
terraspace-0.4.3 lib/terraspace/plugin/config/interface.rb
terraspace-0.4.2 lib/terraspace/plugin/config/interface.rb
terraspace-0.4.1 lib/terraspace/plugin/config/interface.rb
terraspace-0.4.0 lib/terraspace/plugin/config/interface.rb
terraspace-0.3.6 lib/terraspace/plugin/config/interface.rb
terraspace-0.3.5 lib/terraspace/plugin/config/interface.rb
terraspace-0.3.4 lib/terraspace/plugin/config/interface.rb
terraspace-0.3.3 lib/terraspace/plugin/config/interface.rb
terraspace-0.3.2 lib/terraspace/plugin/config/interface.rb
terraspace-0.3.1 lib/terraspace/plugin/config/interface.rb
terraspace-0.3.0 lib/terraspace/plugin/config/interface.rb
terraspace-0.2.4 lib/terraspace/plugin/config/interface.rb
terraspace-0.2.3 lib/terraspace/plugin/config/interface.rb
terraspace-0.2.2 lib/terraspace/plugin/config/interface.rb
terraspace-0.2.1 lib/terraspace/plugin/config/interface.rb
terraspace-0.2.0 lib/terraspace/plugin/config/interface.rb
terraspace-0.1.2 lib/terraspace/plugin/config/interface.rb
terraspace-0.1.1 lib/terraspace/plugin/config/interface.rb
terraspace-0.1.0 lib/terraspace/plugin/config/interface.rb