Sha256: 764ec86b9d72d98d28b17bacd32ad15d91f1038ea2bf2ec47be1076bae479546
Contents?: true
Size: 546 Bytes
Versions: 3
Compression:
Stored size: 546 Bytes
Contents
module Ezid # # A response to an EZID status request # # @see Ezid::Response # @api private # class Status < SimpleDelegator SUBSYSTEMS = %w( noid ldap datacite ) SUBSYSTEMS.each do |s| define_method(s) { subsystems[s] || "not checked" } end def subsystems return {} unless content[1] content[1].split(/\r?\n/).each_with_object({}) do |line, memo| subsystem, status = line.split(": ", 2) memo[subsystem] = status end end def up? success? end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ezid-client-0.7.0 | lib/ezid/status.rb |
ezid-client-0.6.0 | lib/ezid/status.rb |
ezid-client-0.5.0 | lib/ezid/status.rb |