Module: Kind::Functional::DependencyInjection

Included in:
ClassMethods
Defined in:
lib/kind/functional.rb

Instance Method Summary collapse

Instance Method Details

#__dependencies__Object

:nodoc:



36
37
38
# File 'lib/kind/functional.rb', line 36

def __dependencies__ # :nodoc:
  @__dependencies__ ||= {}
end

#dependency(name, kind, default: UNDEFINED) ⇒ Object



40
41
42
43
44
45
46
47
48
# File 'lib/kind/functional.rb', line 40

def dependency(name, kind, default: UNDEFINED)
  __dependencies__[ATTRIBUTES.name!(name)] = ATTRIBUTES.value!(kind, default)

  attr_reader(name)

  private(name)

  name
end