Class: Rapid::Model::HashModelObject

Inherits:
Compo::Branches::Hash
  • Object
show all
Includes:
CompositeModelObject
Defined in:
lib/ury_rapid/model/composite.rb

Overview

A model object whose children are arranged as a hash from their IDs to themselves.

Instance Attribute Summary

Attributes included from ModelObject

#handler_target

Instance Method Summary collapse

Methods included from CompositeModelObject

#get

Methods included from ModelObject

#default_handler_target, #default_id, #flat, #get, #insert, #kill, #post_to_parent, #register_handler, #replace

Methods included from Updatable

#deregister_from_updates, #notify_delete, #notify_update, #register_for_updates, #register_update_channel

Constructor Details

#initialize(handler_target = nil) ⇒ HashModelObject

Returns a new instance of HashModelObject


54
55
56
# File 'lib/ury_rapid/model/composite.rb', line 54

def initialize(handler_target = nil)
  super(handler_target)
end

Instance Method Details

#children_to_get_representation(children_subset, privileges) ⇒ Object


58
59
60
# File 'lib/ury_rapid/model/composite.rb', line 58

def children_to_get_representation(children_subset, privileges)
  children_subset.transform_values { |child| child.get(privileges) }
end