Class: Terraspace::Plugin::Meta
- Inherits:
-
Object
- Object
- Terraspace::Plugin::Meta
- Defined in:
- lib/terraspace/plugin/meta.rb
Instance Method Summary collapse
- #backend ⇒ Object
- #data ⇒ Object
-
#initialize(raw) ⇒ Meta
constructor
raw: => {root: “/path”, backend: “s3”.
- #name ⇒ Object (also: #plugin)
- #root ⇒ Object
Constructor Details
#initialize(raw) ⇒ Meta
raw: => {root: “/path”, backend: “s3”
4 5 6 |
# File 'lib/terraspace/plugin/meta.rb', line 4 def initialize(raw) @raw = raw end |
Instance Method Details
#backend ⇒ Object
21 22 23 |
# File 'lib/terraspace/plugin/meta.rb', line 21 def backend data[:backend] end |
#data ⇒ Object
17 18 19 |
# File 'lib/terraspace/plugin/meta.rb', line 17 def data @raw.values.first end |
#name ⇒ Object Also known as: plugin
8 9 10 11 12 13 14 |
# File 'lib/terraspace/plugin/meta.rb', line 8 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 |
#root ⇒ Object
25 26 27 |
# File 'lib/terraspace/plugin/meta.rb', line 25 def root data[:root] end |