Class: ROM::Repository::RelationReader Private

Inherits:
Module
  • Object
show all
Defined in:
lib/rom/repository/relation_reader.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Modules: InstanceMethods

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass, relations) ⇒ RelationReader

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of RelationReader.


24
25
26
27
28
# File 'lib/rom/repository/relation_reader.rb', line 24

def initialize(klass, relations)
  @klass = klass
  @relations = relations
  define_readers!
end

Instance Attribute Details

#klassObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


8
9
10
# File 'lib/rom/repository/relation_reader.rb', line 8

def klass
  @klass
end

#relationsObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


11
12
13
# File 'lib/rom/repository/relation_reader.rb', line 11

def relations
  @relations
end

Instance Method Details

#included(klass) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


31
32
33
34
# File 'lib/rom/repository/relation_reader.rb', line 31

def included(klass)
  super
  klass.include(InstanceMethods)
end