Sha256: 92a936e767ec5c882499350788992861baf9c832c65043cacba99e25df77b0c7
Contents?: true
Size: 706 Bytes
Versions: 32
Compression:
Stored size: 706 Bytes
Contents
class Holding attr_accessor :locations, :identifier def initialize @locations = [] end def find_location(location) @locations.each do | loc | return loc if loc.name == location end return nil end def find_item_by_attribute(key, value) @locations.each do | loc | loc.items.each do | item | return if item.instance_variable_get('@'+key) == value end end return nil end end class HoldingLocation attr_accessor :name, :code, :items def initialize @items = [] end end class HoldingItem attr_accessor :identifier, :status_code, :status_date, :status, :call_number, :enumeration, :chron, :year end
Version data entries
32 entries across 32 versions & 1 rubygems