use app::Pencil;
use wrappers::{Request, Response};
#[allow(dead_code)]
pub struct PencilClient<'c> {
application: &'c Pencil,
}
impl<'c> PencilClient<'c> {
pub fn new(application: &Pencil) -> PencilClient {
PencilClient { application: application }
}
#[allow(dead_code)]
pub fn get_application(&self) -> &Pencil {
return self.application;
}
fn run_pencil_app(&self, request: &mut Request) -> Response {
self.application.handle_request(request)
}
fn open(&self, mut request: Request) -> Response {
self.run_pencil_app(&mut request)
}
#[allow(dead_code)]
pub fn get(&self, request: Request) -> Response {
self.open(request)
}
}