Class: RoadForest::Resource::RDF::ParentItem

Inherits:
ReadOnly
  • Object
show all
Includes:
RoadForest::Resource::Role::HasChildren, RoadForest::Resource::Role::Writable
Defined in:
lib/roadforest/resource/parent-item.rb

Overview

Used for a resource that has properties itself that can be updated, and also has one or more kinds of dependent or subordinate resources - can new resources be created by posting to this one? e.g. a post, which can have comments

Instance Attribute Summary

Attributes inherited from ReadOnly

#content_engine, #interface, #trace

Instance Method Summary collapse

Methods included from RoadForest::Resource::Role::HasChildren

allowed_methods, #post_is_create, #process_post

Methods included from RoadForest::Resource::Role::Writable

allowed_methods, #content_types_accepted, #delete_resource, included, #known_content_type, #post_is_create, #request_body

Methods inherited from ReadOnly

#content_types_provided, #error_data, #expires, #finish_request, #generate_etag, #interface_supports, #is_authorized?, #last_modified, #method, #params, register, #request_accept_header, #request_uri, #required_grants, #resource_exists?, #response_body=, #response_content_type=, #retrieve_interface, #send, #set_error_body, #trace?

Instance Method Details

#allowed_methodsObject



17
18
19
20
21
# File 'lib/roadforest/resource/parent-item.rb', line 17

def allowed_methods
  (super + [Role::Writable, Role::HasChildren].inject([]) do |list, mod|
    list + mod.allowed_methods
  end).uniq
end