Class: SimpleInjector::Injectable

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_injector/injectable.rb

Overview

Class to handle instances to are injectable

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, callback) ⇒ Injectable

Returns a new instance of Injectable.



8
9
10
11
# File 'lib/simple_injector/injectable.rb', line 8

def initialize(name, callback)
  @name = name
  @callback = callback
end

Instance Attribute Details

#callbackObject

Returns the value of attribute callback.



6
7
8
# File 'lib/simple_injector/injectable.rb', line 6

def callback
  @callback
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/simple_injector/injectable.rb', line 6

def name
  @name
end