summary refs log tree commit diff
path: root/lib/ballet/Git.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ballet/Git.pm')
-rw-r--r--lib/ballet/Git.pm24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/ballet/Git.pm b/lib/ballet/Git.pm
new file mode 100644
index 0000000..6ade622
--- /dev/null
+++ b/lib/ballet/Git.pm
@@ -0,0 +1,24 @@
+package ballet::Git;
+
+use Mouse;
+use Git::Repository;
+
+with 'ballet::Page';
+
+has wiki_path => (
+    is       => 'ro',
+    isa      => 'Str',
+    required => 1,
+);
+
+has git_repo => (
+    is      => 'rw',
+    isa     => 'Git::Repository',
+    lazy    => 1,
+    default => sub {
+        my $self = shift;
+        Git::Repository->new( git_dir => $self->wiki_path ),;
+    },
+);
+
+1;