Module: Flatter::Extension

Extended by:
ActiveSupport::Autoload
Included in:
Flatter::Extensions::ActiveRecord, Flatter::Extensions::Multiparam, Flatter::Extensions::Order, Flatter::Extensions::Skipping, Mapping::Scribe
Defined in:
lib/flatter/extension.rb

Defined Under Namespace

Modules: Registrar Classes: Builder, Factory, Mapper, Mapping

Instance Method Summary collapse

Instance Method Details

#dependenciesObject



21
22
23
# File 'lib/flatter/extension.rb', line 21

def dependencies
  @dependencies ||= []
end

#hook!Object



25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/flatter/extension.rb', line 25

def hook!
  return false if hooked?

  use_dependencies

  mapping.extend!
  mapper.extend!
  factory.extend!

  hook_callback!

  @hooked = true
end

#hooked?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/flatter/extension.rb', line 54

def hooked?
  !!@hooked
end