Sha256: c1d832c32713ecde97c98abece55cd80a7fb555f6ef33f1f219467ca9a64d8e7
Contents?: true
Size: 425 Bytes
Versions: 33
Compression:
Stored size: 425 Bytes
Contents
module Ddr class AdminSet < AuxiliaryResource def self.call(obj) find_by_code(obj.admin_set) rescue ActiveResource::ResourceNotFound => e raise Ddr::NotFoundError, e end def self.find_by_code(code) return unless code fetch(code) { new get(:find, code: code) } end def self.keys fetch("codes") { all.map(&:code) } end def to_s title end end end
Version data entries
33 entries across 33 versions & 1 rubygems