Class: Exlibris::Aleph::Item::CirculationPolicy::Identifier
- Inherits:
-
Object
- Object
- Exlibris::Aleph::Item::CirculationPolicy::Identifier
- Defined in:
- lib/exlibris/aleph/item/circulation_policy/identifier.rb
Instance Attribute Summary collapse
-
#processing_status ⇒ Object
readonly
Returns the value of attribute processing_status.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#sub_library ⇒ Object
readonly
Returns the value of attribute sub_library.
Instance Method Summary collapse
- #==(other_object) ⇒ Object (also: #eql?)
-
#initialize(status, processing_status, sub_library) ⇒ Identifier
constructor
A new instance of Identifier.
Constructor Details
#initialize(status, processing_status, sub_library) ⇒ Identifier
Returns a new instance of Identifier.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/exlibris/aleph/item/circulation_policy/identifier.rb', line 8 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 |
Instance Attribute Details
#processing_status ⇒ Object (readonly)
Returns the value of attribute processing_status.
6 7 8 |
# File 'lib/exlibris/aleph/item/circulation_policy/identifier.rb', line 6 def processing_status @processing_status end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/exlibris/aleph/item/circulation_policy/identifier.rb', line 6 def status @status end |
#sub_library ⇒ Object (readonly)
Returns the value of attribute sub_library.
6 7 8 |
# File 'lib/exlibris/aleph/item/circulation_policy/identifier.rb', line 6 def sub_library @sub_library end |
Instance Method Details
#==(other_object) ⇒ Object Also known as: eql?
23 24 25 26 27 28 |
# File 'lib/exlibris/aleph/item/circulation_policy/identifier.rb', line 23 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 |