class Dspace::Collection
Attributes
copyright_text[RW]
expand[R]
handle[R]
id[R]
introductory_text[RW]
items[R]
license[RW]
link[R]
logo[RW]
name[RW]
number_items[R]
parent_community[R]
parent_community_list[R]
short_description[RW]
type[R]
Public Class Methods
new(args)
click to toggle source
# File lib/dspace/collection.rb, line 12 def initialize args @id = args['id'] @name = args['name'] @handle = args['handle'] @type = args['type'] @link = args['link'] @logo = args['logo'] @license = args['license'] @copyright_text = args['copyrightText'] @introductory_text = args['introductoryText'] @short_description = args['shortDescription'] @sidebar_text = args['sidebarText'] @number_items = args['numberItems'] @expand = args['expand'] @parent_community = Dspace::Community.new(args['parentCommunity']) unless args['parentCommunity'].nil? @parent_community_list = Dspace::Builders::ModelBuilder.build_communities(args['parentCommunityList']) @items = Dspace::Builders::ModelBuilder.build_items(args['items']) end
Public Instance Methods
to_h()
click to toggle source
# File lib/dspace/collection.rb, line 32 def to_h { id: @id, name: @name, handle: @handle, type: @type, link: @link, logo: @logo, parentCommunity: @parent_community, parentCommunitList: @parent_community_list, items: obj2hash(@items), license: @license, copyrightText: @copyright_text, introductoryText: @introductory_text, shortDescription: @short_description, sidebarText: @sidebar_text, numberItems: @number_items, expand: @expand } end