Module: Terraspace::Compiler::Dsl::Syntax::Mod::Variable

Defined in:
lib/terraspace/compiler/dsl/syntax/mod/variable.rb

Instance Method Summary collapse

Instance Method Details

#variable(name, props = {}) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/terraspace/compiler/dsl/syntax/mod/variable.rb', line 3

def variable(name, props={})
  variable = @structure[:variable] ||= {}

  default = { type: "string" }
  props.reverse_merge!(default)

  variable[name] = props
end