Sha256: 3dcca36cfb67d451acfc744629e705f660ed593b24119ef118851aa2e0e917fd
Contents?: true
Size: 498 Bytes
Versions: 38
Compression:
Stored size: 498 Bytes
Contents
module Octobat class SingletonAPIResource < APIResource def self.url if self == SingletonAPIResource raise NotImplementedError.new('SingletonAPIResource is an abstract class. You should perform actions on its subclasses (Account, etc.)') end "/v1/#{CGI.escape(class_name.downcase)}" end def url self.class.url end def self.retrieve(api_key=nil) instance = self.new(nil, api_key) instance.refresh instance end end end
Version data entries
38 entries across 38 versions & 1 rubygems