Class: Summon::Availability

Inherits:
Schema show all
Defined in:
lib/summon/schema/availability.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Schema

inherited

Instance Attribute Details

#call_numberObject (readonly)

Returns the value of attribute call_number.



7
8
9
# File 'lib/summon/schema/availability.rb', line 7

def call_number
  @call_number
end

#locationObject (readonly)

Returns the value of attribute location.



5
6
7
# File 'lib/summon/schema/availability.rb', line 5

def location
  @location
end

#location_stringObject (readonly)

Returns the value of attribute location_string.



6
7
8
# File 'lib/summon/schema/availability.rb', line 6

def location_string
  @location_string
end

#statusObject (readonly)

Returns the value of attribute status.



3
4
5
# File 'lib/summon/schema/availability.rb', line 3

def status
  @status
end

#status_messageObject (readonly)

Returns the value of attribute status_message.



4
5
6
# File 'lib/summon/schema/availability.rb', line 4

def status_message
  @status_message
end

#tokenObject (readonly)

Returns the value of attribute token.



2
3
4
# File 'lib/summon/schema/availability.rb', line 2

def token
  @token
end

Class Method Details

.parse_results(results) ⇒ Object



9
10
11
12
13
# File 'lib/summon/schema/availability.rb', line 9

def self.parse_results(results)
  results["Result"]["RecordSummary"].map do |record| 
    new(@service, record["Record"].merge(:token => record["ID"]))
  end
end