class TerraformWrapper::Shared::Code
Attributes
base[R]
name[R]
path[R]
Public Class Methods
new(options:)
click to toggle source
# File lib/terraform-wrapper/shared/code.rb, line 25 def initialize(options:) logger.fatal("Code base path must be a string!") unless options["base"].kind_of?(String) logger.fatal("Code base path must not be blank!") if options["base"].strip.empty? @base = options["base"] logger.fatal("Code component name must be a string!") unless options["name"].kind_of?(String) logger.fatal("Code component name must not be blank!") if options["name"].strip.empty? @name = options["name"] @path = File.join(@base, @name) end
Public Instance Methods
check()
click to toggle source
# File lib/terraform-wrapper/shared/code.rb, line 41 def check() return exists end
exists()
click to toggle source
# File lib/terraform-wrapper/shared/code.rb, line 47 def exists() return File.directory?(@path) end