Sha256: e2f58a3c430bc20f85c0a9a435a36d30e25a09231e37053b2c4efe283cd22cf0
Contents?: true
Size: 533 Bytes
Versions: 15
Compression:
Stored size: 533 Bytes
Contents
module Jets::Cfn::Resource::ApiGateway class ResourceId def initialize(path) @path = path end # Used by Method and Cors def resource_id @path == '/' ? "RootResourceId" : resource_logical_id.camelize + "ApiResource" end # Example: Posts def resource_logical_id camelized_path.underscore end def camelized_path path = @path path = "homepage" if path == '/' path.gsub('/','_').gsub(':','').gsub('*','').gsub('.','').camelize end end end
Version data entries
15 entries across 15 versions & 1 rubygems