Module: Flows::Plugin::DependencyInjector::DSL Private

Defined in:
lib/flows/plugin/dependency_injector.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Since:

  • 0.4.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dependenciesObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.4.0



99
100
101
# File 'lib/flows/plugin/dependency_injector.rb', line 99

def dependencies
  @dependencies
end

Instance Method Details

#dependency(name, required: false, default: NO_DEFAULT, type: NO_TYPE) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

:reek:BooleanParameter disabled here because it's not applicable for DSLs

Since:

  • 0.4.0



102
103
104
105
106
107
108
109
110
# File 'lib/flows/plugin/dependency_injector.rb', line 102

def dependency(name, required: false, default: NO_DEFAULT, type: NO_TYPE)
  dependencies[name] = DependencyDefinition.new(
    name: name,
    required: required,
    default: default,
    type: type,
    klass: self
  )
end