Class: Cuprum::Collections::Relation

Inherits:
Object
  • Object
show all
Includes:
Cuprum::Collections::Relations::Options, Cuprum::Collections::Relations::Parameters
Defined in:
lib/cuprum/collections/relation.rb

Overview

Abstract class representing a group or view of entities.

Direct Known Subclasses

Resource

Instance Attribute Summary

Attributes included from Cuprum::Collections::Relations::Parameters

#name, #plural_name, #qualified_name, #singular_name

Attributes included from Cuprum::Collections::Relations::Options

#options

Instance Method Summary collapse

Methods included from Cuprum::Collections::Relations::Parameters

#entity_class, resolve_parameters, #resolve_parameters

Constructor Details

#initialize(entity_class: nil, name: nil, qualified_name: nil, singular_name: nil, **options) ⇒ Object

Parameters:

  • entity_class (Class, String) (defaults to: nil)

    the class of entity represented by the relation.

  • name (String) (defaults to: nil)

    the name of the relation.

  • qualified_name (String) (defaults to: nil)

    a scoped name for the relation.

  • singular_name (String) (defaults to: nil)

    the name of an entity in the relation.

  • options (Hash)

    additional options for the relation.



# File 'lib/cuprum/collections/relation.rb', line 13