Class: Coarnotify::Patterns::RequestReviewObject

Inherits:
Core::Notify::NotifyObject show all
Defined in:
lib/coarnotify/patterns/request_review.rb

Overview

Custom Request Review Object class to return the custom RequestReviewItem class

Instance Attribute Summary

Attributes inherited from Core::Notify::NotifyBase

#properties_by_reference, #validate_properties, #validate_stream_on_construct, #validators

Instance Method Summary collapse

Methods inherited from Core::Notify::NotifyObject

#cite_as, #cite_as=, #item=, #triple, #triple=, #validate

Methods inherited from Core::Notify::NotifyPatternPart

#allowed_types, allowed_types, default_type, #initialize, #type=

Methods inherited from Core::Notify::NotifyBase

#doc, #get_property, #id, #id=, #initialize, #optional_and_validate, #register_property_validation_error, #required, #required_and_validate, #set_property, #to_jsonld, #type, #type=, #validate, #validate_property

Constructor Details

This class inherits a constructor from Coarnotify::Core::Notify::NotifyPatternPart

Instance Method Details

#itemRequestReviewItem?

Custom getter to retrieve the item property as a RequestReviewItem

Returns:



36
37
38
39
40
41
42
43
44
# File 'lib/coarnotify/patterns/request_review.rb', line 36

def item
  i = get_property(Core::Notify::NotifyProperties::ITEM)
  if i
    RequestReviewItem.new(stream: i, validate_stream_on_construct: false,
                          validate_properties: @validate_properties, validators: @validators,
                          validation_context: Core::Notify::NotifyProperties::ITEM,
                          properties_by_reference: @properties_by_reference)
  end
end