Class: Datacraft::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/datacraft/context.rb

Instance Method Summary collapse

Constructor Details

#initializeContext

Returns a new instance of Context.



3
4
5
6
7
# File 'lib/datacraft/context.rb', line 3

def initialize
  options[:parallel] = false
  options[:benchmark] = false
  options[:n_threads] = 8
end

Instance Method Details

#consumersObject



13
14
15
# File 'lib/datacraft/context.rb', line 13

def consumers
  @consumers ||= ConsumerRegistry.new
end

#optionsObject



29
30
31
# File 'lib/datacraft/context.rb', line 29

def options
  @options ||= {}
end

#post_hooksObject



25
26
27
# File 'lib/datacraft/context.rb', line 25

def post_hooks
  @post_hooks ||= HookRegistry.new
end

#pre_hooksObject



21
22
23
# File 'lib/datacraft/context.rb', line 21

def pre_hooks
  @pre_hooks ||= HookRegistry.new
end

#providersObject



9
10
11
# File 'lib/datacraft/context.rb', line 9

def providers
  @providers ||= ProviderRegistry.new
end

#tweakersObject



17
18
19
# File 'lib/datacraft/context.rb', line 17

def tweakers
  @tweakers ||= TweakerRegistry.new
end