module Terraspace::Terraform::Args::Dsl
Public Instance Methods
command(*commands, **props)
click to toggle source
# File lib/terraspace/terraform/args/dsl.rb, line 5 def command(*commands, **props) commands.each do |name| if shorthand?(name) shorthand_commands(name, props) else each_command(name, props) end end end
Also aliased as: commands
each_command(name, props={})
click to toggle source
# File lib/terraspace/terraform/args/dsl.rb, line 26 def each_command(name, props={}) @commands[name] = props end
shorthand?(name)
click to toggle source
# File lib/terraspace/terraform/args/dsl.rb, line 16 def shorthand?(name) shorthands.key?(name.to_sym) end
shorthand_commands(name, props)
click to toggle source
# File lib/terraspace/terraform/args/dsl.rb, line 20 def shorthand_commands(name, props) shorthands[name].each do |n| each_command(n, props) end end