lib/assembly_line.rb in assembly_line-0.2.0 vs lib/assembly_line.rb in assembly_line-0.2.1
- old
+ new
@@ -1,34 +1,31 @@
require 'forwardable'
require 'assembly_line/registry'
require 'assembly_line/constructor'
-require 'assembly_line/global_context'
+require 'assembly_line/generic_context'
module AssemblyLine
- VERSION = "0.2.0".freeze
+ VERSION = "0.2.1".freeze
+ extend SingleForwardable
+ def self.assemble(name, context, options={})
+ Registry.locate(name).assemble(context, options)
+ end
+
def self.define(name, &block)
Registry.add(name, block)
end
- def self.assemble(name, rspec_context, options={})
- Registry.locate(name).assemble(rspec_context, options)
+ def self.generic_context
+ @generic_context ||= GenericContext.new
end
def Assemble(name, options={})
AssemblyLine.assemble(name, self, options)
end
end
module Kernel
- extend Forwardable
-
def Assemble(name, options={})
- AssemblyLine.assemble(name, assembly_line_global_context, options)
- end
-
- protected
-
- def assembly_line_global_context
- AssemblyLine::GlobalContext
+ AssemblyLine.assemble(name, AssemblyLine.generic_context, options)
end
end