Then in other code:
if( $attribute->metadescription->does('Ernst::Description::Trait::Friendly') ){
print $attribute->metadescription->instructions;
}
else {
print "Type in a value for '@{[$attribute->name]}': ";
}
return <>;
- key point: we are not assuming "instructions" means anything unless the Friendly trait is consumed