Module: Flatter::Mapper::Mounting::ClassMethods

Defined in:
lib/flatter/mapper/mounting.rb

Instance Method Summary collapse

Instance Method Details

#mount(name, **opts) ⇒ Object



19
20
21
22
# File 'lib/flatter/mapper/mounting.rb', line 19

def mount(name, **opts)
  factory_options = opts.reverse_merge(mounter_name: self.name || label)
  mountings[name.to_s] = Flatter::Mapper::Factory.new(name, **factory_options)
end

#mountingsObject



24
25
26
# File 'lib/flatter/mapper/mounting.rb', line 24

def mountings
  @mountings ||= {}
end

#mountings=(val) ⇒ Object



28
29
30
# File 'lib/flatter/mapper/mounting.rb', line 28

def mountings=(val)
  @mountings = val
end