Sha256: bbaf4e8dd77da0eb81d82f955b1824324c44d830a9351defac3d8bf3d0cc4539
Contents?: true
Size: 500 Bytes
Versions: 8
Compression:
Stored size: 500 Bytes
Contents
module Pingpp class SingletonAPIResource < APIResource def self.resource_url(opts={}) if self == SingletonAPIResource raise NotImplementedError.new('SingletonAPIResource is an abstract class.') end "/v1/#{CGI.escape(class_name.downcase)}" end def resource_url(opts={}) self.class.resource_url(opts) end def self.retrieve(opts={}) instance = self.new(nil, Util.normalize_opts(opts)) instance.refresh instance end end end
Version data entries
8 entries across 8 versions & 1 rubygems