Sha256: f5ccd1ab820fdcf9a791ca2f89704bd6edde5532e315008885292a7f37bd7733
Contents?: true
Size: 1.15 KB
Versions: 3
Compression:
Stored size: 1.15 KB
Contents
module Exlibris module Aleph class Item class CirculationPolicy class Identifier attr_reader :status, :processing_status, :sub_library def initialize(status, processing_status, sub_library) unless status.is_a?(Status) raise ArgumentError.new("Expecting #{status} to be a Item::Status") end unless processing_status.is_a?(ProcessingStatus) raise ArgumentError.new("Expecting #{processing_status} to be a Item::ProcessingStatus") end unless sub_library.is_a?(SubLibrary) raise ArgumentError.new("Expecting #{sub_library} to be a SubLibrary") end @status = status @processing_status = processing_status @sub_library = sub_library end def ==(other_object) (other_object.instance_of?(self.class) && status == other_object.status && processing_status == other_object.processing_status && sub_library == other_object.sub_library) end alias_method :eql?, :== end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems