class Aspire::Object::ListSection

Represents a reading list section in the Aspire API

Attributes

description[RW]

@!attribute [rw] description

@return [String] the reading list section description
name[RW]

@!attribute [rw] name

@return [String] the reading list section name

Public Class Methods

new(uri, factory, parent = nil, json: nil, ld: nil) click to toggle source

Initialises a new ListSection instance @param uri [String] the URI of the object @param factory [Aspire::Object::Factory] a factory returning ListBase

subclass instances

@param parent [Aspire::Object::ListBase] this object’s parent object @param json [Hash] the parsed JSON data from the Aspire JSON API @param ld [Hash] the parsed JSON data from the Aspire linked data API @return [void]

Calls superclass method Aspire::Object::ListBase::new
# 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

Public Instance Methods

to_s() click to toggle source

Returns a string representation of the ListSection instance (the section

name)

@return [String] the string representation of the ListSection instance

Calls superclass method Aspire::Object::Base#to_s
# File lib/aspire/object/list.rb, line 585
def to_s
  name || super
end