Module: Terraspace::Compiler::Dsl::Syntax::Helpers::Common

Extended by:
Memoist
Defined in:
lib/terraspace/compiler/dsl/syntax/helpers/common.rb

Constant Summary collapse

Meta =
Terraspace::Compiler::Dsl::Meta

Instance Method Summary collapse

Instance Method Details

#localObject



11
12
13
# File 'lib/terraspace/compiler/dsl/syntax/helpers/common.rb', line 11

def local
  Meta::Local.new
end

#terraspace_command(separator = ' ') ⇒ Object

Only show the first 2 args and now the options. Examples:

terraspace_command => "terraspace up demo"
terraspace_command('-') => "terraspace-up-demo"


21
22
23
24
25
# File 'lib/terraspace/compiler/dsl/syntax/helpers/common.rb', line 21

def terraspace_command(separator=' ')
  args = Terraspace.argv[0..1] || []
  command = ["terraspace"] + args
  command.join(separator)
end

#varObject



6
7
8
# File 'lib/terraspace/compiler/dsl/syntax/helpers/common.rb', line 6

def var
  Meta::Var.new
end