DataMapper::Adapters

Public Class Methods

aggregate_module(const_name) click to toggle source
    # File lib/dm-aggregates.rb, line 35
35:     def self.aggregate_module(const_name)
36:       Aggregates.const_get(const_name)
37:     end
include_aggregate_api(const_name) click to toggle source
    # File lib/dm-aggregates.rb, line 24
24:     def self.include_aggregate_api(const_name)
25:       require aggregate_extensions(const_name)
26:       if Aggregates.const_defined?(const_name)
27:         adapter = const_get(const_name)
28:         adapter.send(:include, aggregate_module(const_name))
29:       end
30:     rescue LoadError
31:       # Silently ignore the fact that no adapter extensions could be required
32:       # This means that the adapter in use doesn't support aggregates
33:     end

Private Class Methods

aggregate_extensions(const_name) click to toggle source

@api private

    # File lib/dm-aggregates.rb, line 42
42:       def aggregate_extensions(const_name)
43:         name = adapter_name(const_name)
44:         name = 'do' if name == 'dataobjects'
45:         "dm-aggregates/adapters/dm-#{name}-adapter"
46:       end

Public Instance Methods

const_added(const_name) click to toggle source

@api private

    # File lib/dm-aggregates.rb, line 51
51:       def const_added(const_name)
52:         include_aggregate_api(const_name)
53:         super
54:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.