Sha256: e14d4c540000b1e53c59fa39f616eedf7349ad2b26b22e261cf6ee1be38c60f3
Contents?: true
Size: 996 Bytes
Versions: 3
Compression:
Stored size: 996 Bytes
Contents
module Exlibris module Aleph class Item class CirculationPolicy attr_reader :identifier, :display, :privileges def initialize(identifier, display, privileges) unless identifier.is_a?(Identifier) raise ArgumentError.new("Expecting #{identifier} to be a Item::CirculationPolicy::Identifier") end unless display.is_a?(Display) raise ArgumentError.new("Expecting #{identifier} to be a Item::CirculationPolicy::Display") end unless privileges.is_a?(Privileges) raise ArgumentError.new("Expecting #{privileges} to be a Item::CirculationPolicy::Privileges") end @identifier = identifier @display = display @privileges = privileges end def ==(other_object) (other_object.instance_of?(self.class) && identifier == other_object.identifier) end alias_method :eql?, :== end end end end
Version data entries
3 entries across 3 versions & 1 rubygems