Module: FlatMap::OpenMapper::Mounting::ClassMethods

Defined in:
lib/flat_map/open_mapper/mounting.rb

Overview

Mounting class macros.

Instance Method Summary collapse

Instance Method Details

#mount(*args, &block) ⇒ Array<FlatMap::OpenMapper::Factory>

Add a mounting factory to a list of factories of a class These factories are used to create actual mounted objects, which are mappers themselves, associated to a particular mapper.

Parameters:

  • args (*Object)

Returns:



25
26
27
# File 'lib/flat_map/open_mapper/mounting.rb', line 25

def mount(*args, &block)
  mountings << FlatMap::OpenMapper::Factory.new(*args, &block)
end

#mountingsArray<FlatMap::OpenMapper>

List of mountings (factories) of a class.

Returns:



32
33
34
# File 'lib/flat_map/open_mapper/mounting.rb', line 32

def mountings
  @mountings ||= []
end

#mountings=(val) ⇒ Object

Writer for @mountings.



37
38
39
# File 'lib/flat_map/open_mapper/mounting.rb', line 37

def mountings=(val)
  @mountings = val
end