Class: ResourceOrderedRecords

Inherits:
Record
  • Object
show all
Defined in:
public/app/models/resource_ordered_records.rb

Defined Under Namespace

Classes: Entry

Constant Summary

Constants inherited from Record

Record::ABSTRACT

Instance Attribute Summary collapse

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

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

#entriesObject (readonly)

Returns the value of attribute entries



3
4
5
# File 'public/app/models/resource_ordered_records.rb', line 3

def entries
  @entries
end