Class: OMF::SFA::Resource::Project
- Defined in:
- lib/omf-sfa/resource/project.rb
Overview
This class represents a Project which is strictly connected to the notion of the Slice/Account
Instance Method Summary collapse
-
#to_hash_long(h, objs, opts = {}) ⇒ Object
has n, :project_memberships has n, :users, :through => :project_memberships, :via => :user.
Methods inherited from OResource
#_dirty_self?, #_oprops_to_hash, #all_resources, #clone, #default_href_prefix, #destroy, #destroy!, #dirty_self?, #each_resource, #group?, #href, href_resolver, init, json_create, #oproperties_as_hash, #oproperty, oproperty, #oproperty_array_get, #oproperty_get, #oproperty_set, prop_all, #remove_from_all_groups, #resource_type, #status, #to_hash, #to_hash_brief, #to_json, #uuid
Instance Method Details
#to_hash_long(h, objs, opts = {}) ⇒ Object
has n, :project_memberships has n, :users, :through => :project_memberships, :via => :user
18 19 20 21 22 23 24 25 |
# File 'lib/omf-sfa/resource/project.rb', line 18 def to_hash_long(h, objs, opts = {}) super href_only = opts[:level] >= opts[:max_level] h[:users] = self.users.map do |p| href_only ? p.href : p.to_hash(objs, opts) end h end |