Sha256: 6bc509c026f98e7d370fd8ded575307bba0eb5b3f9fdf3540da4b35bed64841a
Contents?: true
Size: 885 Bytes
Versions: 40
Compression:
Stored size: 885 Bytes
Contents
class Terraspace::Builder::Allow class Region < Base # interface method def message messages = [] word = config_name.to_s # IE: regions or locations messages << "This #{word.singularize} is not allowed to be used: Detected current #{word.singularize}=#{current_region}" messages << "Allow #{word}: #{allows.join(', ')}" if allows messages << "Deny #{word}: #{denys.join(', ')}" if denys messages.join("\n") end # interface method def check_value current_region end def current_region expander = Terraspace::Compiler::Expander.autodetect(@mod).expander expander.region end def config_name if config.allow.locations || config.deny.locations :locations # ActiveSuport::HashWithIndifferentAccess#dig requires symbol else super # :regions end end end end
Version data entries
40 entries across 40 versions & 1 rubygems