Class: Corindon::DependencyInjection::Token::ValueToken

Inherits:
InjectionToken
  • Object
show all
Defined in:
lib/corindon/dependency_injection/token/value_token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:) ⇒ ValueToken

Returns a new instance of ValueToken.

Parameters:

  • value (Object)


10
11
12
13
14
# File 'lib/corindon/dependency_injection/token/value_token.rb', line 10

def initialize(value:)
  super()

  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



7
8
9
# File 'lib/corindon/dependency_injection/token/value_token.rb', line 7

def value
  @value
end

Instance Method Details

#resolveObject



16
17
18
# File 'lib/corindon/dependency_injection/token/value_token.rb', line 16

def resolve(*)
  @value
end