1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::path::Path;

use crate::temp_file::TempFile;

#[derive(Debug)]
pub struct ResourceFile(TempFile);

impl ResourceFile {
    pub fn new(data: &str) -> std::io::Result<Self> {
        Ok(Self(TempFile::new("custom.yaml", data)?))
    }

    pub fn path(&self) -> &Path {
        self.0.path()
    }
}