Class: Ruice::Dependency

Inherits:
Object
  • Object
show all
Defined in:
lib/ruice/container.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target, is_fresh = false) ⇒ Dependency

Returns a new instance of Dependency.



3
4
5
6
# File 'lib/ruice/container.rb', line 3

def initialize(target, is_fresh = false)
  @target = target
  @is_fresh = is_fresh
end

Instance Attribute Details

#is_freshObject (readonly)

Returns the value of attribute is_fresh.



8
9
10
# File 'lib/ruice/container.rb', line 8

def is_fresh
  @is_fresh
end

#namedObject (readonly)

Returns the value of attribute named.



8
9
10
# File 'lib/ruice/container.rb', line 8

def named
  @named
end

#targetObject (readonly)

Returns the value of attribute target.



8
9
10
# File 'lib/ruice/container.rb', line 8

def target
  @target
end