aboutsummaryrefslogtreecommitdiffstats
path: root/lib/LXRng/Repo/Directory.pm
diff options
context:
space:
mode:
authorArne Georg Gleditsch <argggh@lxr.linpro.no>2007-07-05 00:51:08 +0200
committerArne Georg Gleditsch <argggh@lxr.linpro.no>2007-07-05 00:51:08 +0200
commite9fa4c98bb5f084739d3418ade3f0c51e34a0aa1 (patch)
treefec1d635625e031cde7cba1b0a1d95ee92ac760b /lib/LXRng/Repo/Directory.pm
Rebase tree.
Diffstat (limited to 'lib/LXRng/Repo/Directory.pm')
-rw-r--r--lib/LXRng/Repo/Directory.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/LXRng/Repo/Directory.pm b/lib/LXRng/Repo/Directory.pm
new file mode 100644
index 0000000..ad892b2
--- /dev/null
+++ b/lib/LXRng/Repo/Directory.pm
@@ -0,0 +1,17 @@
+package LXRng::Repo::Directory;
+
+use strict;
+
+sub name {
+ my ($self) = @_;
+
+ return $$self{'name'};
+}
+
+sub node {
+ my ($self) = @_;
+
+ $self->name =~ m,([^/]+)/?$, and return $1;
+}
+
+1;