Class: Aspire::Object::ListSection
- Includes:
- Properties
- Defined in:
- lib/aspire/object/list.rb
Overview
Represents a reading list section in the Aspire API
Constant Summary
Constants included from Properties
Properties::AIISO_CODE, Properties::AIISO_NAME, Properties::CREATED, Properties::DESCRIPTION, Properties::HAS_CREATOR, Properties::HAS_OWNER, Properties::LAST_PUBLISHED, Properties::LAST_UPDATED, Properties::NAME, Properties::PUBLISHED_BY, Properties::USED_BY
Constants inherited from ListBase
Aspire::Object::ListBase::KEY_PREFIX
Constants inherited from Base
Constants included from Util
Instance Attribute Summary collapse
-
#description ⇒ String
The reading list section description.
-
#name ⇒ String
The reading list section name.
Attributes inherited from ListBase
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(uri, factory, parent = nil, json: nil, ld: nil) ⇒ void
constructor
Initialises a new ListSection instance.
-
#to_s ⇒ String
Returns a string representation of the ListSection instance (the section name).
Methods inherited from ListBase
#each, #each_item, #each_section, #get_entries, #items, #length, #parent_list, #parent_lists, #parent_section, #parent_sections, #parents, #parents_include?, #sections
Methods inherited from Base
#get_boolean, #get_date, #get_property
Methods included from Util
#child_url?, #duration, #id_from_uri, #item?, #linked_data, #linked_data_path, #list?, #list_url?, #module?, #parent_url?, #parse_url, #resource?, #section?, #url_for_comparison, #url_path, #user?
Constructor Details
#initialize(uri, factory, parent = nil, json: nil, ld: nil) ⇒ void
Initialises a new ListSection instance
575 576 577 578 579 580 |
# File 'lib/aspire/object/list.rb', line 575 def initialize(uri, factory, parent = nil, json: nil, ld: nil) super(uri, factory, parent, json: json, ld: ld) section_ld = linked_data(uri, ld) self.description = get_property(DESCRIPTION, section_ld) self.name = get_property(NAME, section_ld) end |
Instance Attribute Details
#description ⇒ String
Returns the reading list section description.
561 562 563 |
# File 'lib/aspire/object/list.rb', line 561 def description @description end |
#name ⇒ String
Returns the reading list section name.
565 566 567 |
# File 'lib/aspire/object/list.rb', line 565 def name @name end |
Instance Method Details
#to_s ⇒ String
Returns a string representation of the ListSection instance (the section
name)
585 586 587 |
# File 'lib/aspire/object/list.rb', line 585 def to_s name || super end |