Sha256: f4ef8ef124c2b804cf8c9aa2d3537696968ebaad55b048eda6db16eab48b2dec

Contents?: true

Size: 522 Bytes

Versions: 104

Compression:

Stored size: 522 Bytes

Contents

module Terraspace::Plugin
  class Meta
    # raw: {"aws" => {root: "/path", backend: "s3"}
    def initialize(raw)
      @raw = raw
    end

    def name
      name = @raw.keys.first
      unless name
        raise "No plugin found. Are you sure you have the terraspace_plugin_XXX configured in your Gemfile?"
      end
      name.camelize
    end
    alias_method :plugin, :name

    def data
      @raw.values.first
    end

    def backend
      data[:backend]
    end

    def root
      data[:root]
    end
  end
end

Version data entries

104 entries across 104 versions & 1 rubygems

Version Path
terraspace-2.2.17 lib/terraspace/plugin/meta.rb
terraspace-2.2.16 lib/terraspace/plugin/meta.rb
terraspace-2.2.15 lib/terraspace/plugin/meta.rb
terraspace-2.2.14 lib/terraspace/plugin/meta.rb
terraspace-2.2.13 lib/terraspace/plugin/meta.rb
terraspace-2.2.12 lib/terraspace/plugin/meta.rb
terraspace-2.2.11 lib/terraspace/plugin/meta.rb
terraspace-2.2.10 lib/terraspace/plugin/meta.rb
terraspace-2.2.9 lib/terraspace/plugin/meta.rb
terraspace-2.2.8 lib/terraspace/plugin/meta.rb
terraspace-2.2.7 lib/terraspace/plugin/meta.rb
terraspace-2.2.6 lib/terraspace/plugin/meta.rb
terraspace-2.2.5 lib/terraspace/plugin/meta.rb
terraspace-2.2.4 lib/terraspace/plugin/meta.rb
terraspace-2.2.3 lib/terraspace/plugin/meta.rb
terraspace-2.2.2 lib/terraspace/plugin/meta.rb
terraspace-2.2.1 lib/terraspace/plugin/meta.rb
terraspace-2.2.0 lib/terraspace/plugin/meta.rb
terraspace-2.1.7 lib/terraspace/plugin/meta.rb
terraspace-2.1.6 lib/terraspace/plugin/meta.rb