Aspect: Optionally get configuration
This commit is contained in:
parent
f1246093f1
commit
96deb17515
1 changed files with 4 additions and 1 deletions
|
@ -7,17 +7,20 @@ use hook::accessor::HookDataAccessor as HDA;
|
|||
|
||||
use hook::error::HookError as HE;
|
||||
use hook::error::HookErrorKind as HEK;
|
||||
use configuration::AspectConfig;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Aspect {
|
||||
cfg: Option<AspectConfig>,
|
||||
name: String,
|
||||
hooks: Vec<Box<Hook>>,
|
||||
}
|
||||
|
||||
impl Aspect {
|
||||
|
||||
pub fn new(name: String) -> Aspect {
|
||||
pub fn new(name: String, cfg: Option<AspectConfig>) -> Aspect {
|
||||
Aspect {
|
||||
cfg: cfg,
|
||||
name: name,
|
||||
hooks: vec![],
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue