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, #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
#[], #dig, #note, #parse_full_title, #request_item
Methods included from PrefixHelper
app_prefix, #app_prefix, app_prefix_js, #app_prefix_js
Methods included from RecordHelper
#badge_for_type, #icon_for_type, #record_class_for_type, #record_for_type, #record_from_resolved_json
Methods included from JsonHelper
#merge_notes, #process_json_notes
Methods included from ManipulateNode
#inheritance, #process_mixed_content, #strip_mixed_content
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 |