Sha256: ada71874d79e8bbd5ae504cb55e02fcd1036f3832387ceefca59fa39788a317f
Contents?: true
Size: 555 Bytes
Versions: 8
Compression:
Stored size: 555 Bytes
Contents
module MangoPay # @abstract class Resource protected def self.class_name self.name.split('::')[-1] end def self.url(id = nil) if self == Resource raise NotImplementedError.new('Resource is an abstract class. Do not use it directly.') end if id "/v2/#{MangoPay.configuration.client_id}/#{CGI.escape(class_name.downcase)}s/#{CGI.escape(id.to_s)}" else "/v2/#{MangoPay.configuration.client_id}/#{CGI.escape(class_name.downcase)}s" end end end end
Version data entries
8 entries across 8 versions & 1 rubygems