Class: Flows::Plugin::DependencyInjector::DependencyDefinition Private

Inherits:
Struct
  • Object
show all
Defined in:
lib/flows/plugin/dependency_injector/dependency_definition.rb

Overview

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

Struct for storing dependency definitions.

Since:

  • 0.4.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDependencyDefinition

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.

Returns a new instance of DependencyDefinition.

Raises:

Since:

  • 0.4.0



8
9
10
11
12
# File 'lib/flows/plugin/dependency_injector/dependency_definition.rb', line 8

def initialize(*)
  super

  raise MissingDependencyDefaultError.new(klass, name) if !required && (default == NO_DEFAULT)
end

Instance Attribute Details

#defaultObject

Returns the value of attribute default

Returns:

  • (Object)

    the current value of default



7
8
9
# File 'lib/flows/plugin/dependency_injector/dependency_definition.rb', line 7

def default
  @default
end

#klassObject

Returns the value of attribute klass

Returns:

  • (Object)

    the current value of klass



7
8
9
# File 'lib/flows/plugin/dependency_injector/dependency_definition.rb', line 7

def klass
  @klass
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



7
8
9
# File 'lib/flows/plugin/dependency_injector/dependency_definition.rb', line 7

def name
  @name
end

#requiredObject

Returns the value of attribute required

Returns:

  • (Object)

    the current value of required



7
8
9
# File 'lib/flows/plugin/dependency_injector/dependency_definition.rb', line 7

def required
  @required
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



7
8
9
# File 'lib/flows/plugin/dependency_injector/dependency_definition.rb', line 7

def type
  @type
end