wena 0.2.0

Wena is a micro-framework that provides an elegant starting point for your console application.
Documentation
use terminal_size::terminal_size;

pub struct Terminal {
    width: usize,
}

impl Terminal {
    pub fn new(width: usize) -> Self {
        Self { width }
    }

    pub fn default() -> Self {
        let sizes = terminal_size();

        if let Some((width, _)) = sizes {
            Self::new(width.0 as usize)
        } else {
            Self::new(80)
        }
    }

    pub fn width(&self) -> usize {
        self.width
    }
}