Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 53b93ab845
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (19 sloc) 0.425 kb
require "morphine/version"
module Morphine
def self.included(base)
base.extend ClassMethods
end
def dependencies
@dependencies ||= {}
end
module ClassMethods
def register(name, &block)
define_method name do |*args|
dependencies[name] ||= instance_exec(*args,&block)
end
define_method "#{name}=" do |service|
dependencies[name] = service
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.