Class: ResourceOrderedRecords
- Defined in:
- public/app/models/resource_ordered_records.rb
Defined Under Namespace
Classes: Entry
Constant Summary
Constants inherited from Record
Instance Attribute Summary collapse
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
Attributes inherited from Record
#agents, #classifications, #container_display, #container_summary_for_badge, #container_titles_and_uris, #criteria, #dates, #display_string, #extents, #external_documents, #full, #highlights, #identifier, #json, #lang_materials, #level, #linked_digital_objects, #notes, #other_level, #primary_type, #raw, #repository_information, #resolved_repository, #resolved_resource, #resolved_top_container, #subjects, #uri
Instance Method Summary collapse
-
#initialize(*args) ⇒ ResourceOrderedRecords
constructor
A new instance of ResourceOrderedRecords.
Methods inherited from Record
#[], #apply_highlighting, #dig, #note, #parse_full_title, #request_item
Constructor Details
#initialize(*args) ⇒ ResourceOrderedRecords
Returns a new instance of ResourceOrderedRecords.
7 8 9 10 11 12 13 14 |
# File 'public/app/models/resource_ordered_records.rb', line 7 def initialize(*args) super @entries = Array(json['uris']).map {|entry| Entry.new(entry.fetch('ref'), entry.fetch('display_string'), entry.fetch('depth'), entry.fetch('level'))} end |
Instance Attribute Details
#entries ⇒ Object (readonly)
Returns the value of attribute entries
3 4 5 |
# File 'public/app/models/resource_ordered_records.rb', line 3 def entries @entries end |