Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial rewrite of Container library
- Loading branch information
1 parent
ad6cfc6
commit 3a68299
Showing
18 changed files
with
391 additions
and
613 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
class Rosella.Container.Argument | ||
{ | ||
function get_value(var container) | ||
{ | ||
Rosella.Error.must_subclass(__CLASS__); | ||
} | ||
} | ||
|
||
class Rosella.Container.Argument.Resolve : Rosella.Container.Argument | ||
{ | ||
var type; | ||
|
||
function Resolve(var type) | ||
{ | ||
self.type = type; | ||
} | ||
|
||
function get_value(var container) | ||
{ | ||
return container.resolve(self.type); | ||
} | ||
} | ||
|
||
class Rosella.Container.Argument.Instance : Rosella.Container.Argument | ||
{ | ||
var instance; | ||
|
||
function Instance(var instance) | ||
{ | ||
self.instance = instance; | ||
} | ||
|
||
function get_value(var container) | ||
{ | ||
return self.instance; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.