Sha256: 7342ecdd5e887111fea8ab2da9a37d7a41940e54806b59fe4bb54874ea4eae0b
Contents?: true
Size: 1.25 KB
Versions: 8
Compression:
Stored size: 1.25 KB
Contents
class OEHClient::Meta::Entity ### ### ------------- Constants ### ### ### ------------- Attributes ### attr_accessor :space # The configured OEHClient::Config::Space object that represents the OEH workspace ### ### ------------- Class Methods ### def self.create() end # def self.create def self.find(*args) options = args.extract_options! case args.first when :first then find_initial(options) when :last then find_last(options) when :all then find_every(options) else find_from_id(args, options) end end def self.fetch(space, entity_type) url = "#{OEHClient::Helper::Request::ONE_PROTOCOL}#{space.host}#{OEHClient::Helper::Request::THUNDERHEAD_DOMAIN}/one/services/api/#{entity_type.downcase.pluralize}" header = (!space.cookies.nil? ? {:cookies => space.cookies}.merge!(OEHClient::Helper::Request.default_JSON_header()) : OEHClient::Helper::Request.default_JSON_header()) response = OEHClient.get(url, nil, :header => header) end ### ### ------------- Instance Methods ### ### ### ------------- Protected Class Methods ### protected def self.find_initial(options) end def self.find_last(options) end def self_find_every(options) end def self.find_from_id(args, options) end end
Version data entries
8 entries across 8 versions & 1 rubygems