Class: Ruse::ObjectFactory::Initializer::MethodArgument
- Inherits:
-
Struct
- Object
- Struct
- Ruse::ObjectFactory::Initializer::MethodArgument
show all
- Defined in:
- lib/ruse/object_factory.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Instance Attribute Details
#arg_type ⇒ Object
Returns the value of attribute arg_type
37
38
39
|
# File 'lib/ruse/object_factory.rb', line 37
def arg_type
@arg_type
end
|
#identifier ⇒ Object
Returns the value of attribute identifier
37
38
39
|
# File 'lib/ruse/object_factory.rb', line 37
def identifier
@identifier
end
|
#injector ⇒ Object
Returns the value of attribute injector
37
38
39
|
# File 'lib/ruse/object_factory.rb', line 37
def injector
@injector
end
|
Class Method Details
.build(arg_type, *args) ⇒ Object
Instance Method Details
#build_dependency ⇒ Object
45
46
47
|
# File 'lib/ruse/object_factory.rb', line 45
def build_dependency
injector.get identifier
end
|
#must_resolve? ⇒ Boolean
49
50
51
|
# File 'lib/ruse/object_factory.rb', line 49
def must_resolve?
required? || injector.can_resolve?(identifier)
end
|
#resolve(initializer) ⇒ Object
53
54
55
|
# File 'lib/ruse/object_factory.rb', line 53
def resolve(initializer)
resolve!(initializer) if must_resolve?
end
|