Class: Absinthe::Distillery::Warehouse

Inherits:
Object
  • Object
show all
Defined in:
lib/absinthe/distillery.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(main_object) ⇒ Warehouse

Returns a new instance of Warehouse.



12
13
14
15
16
17
# File 'lib/absinthe/distillery.rb', line 12

def initialize main_object
  raise "Warehouse init failure!" if main_object.nil?
  @root_context = Context.new
  root_context.register :namespace, RootNamespace.new(main_object)
  root_context.register :source_loader, SourceLoader
end

Instance Attribute Details

#root_contextObject (readonly)

Returns the value of attribute root_context.



11
12
13
# File 'lib/absinthe/distillery.rb', line 11

def root_context
  @root_context
end