Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove category attr from Example() class
A Category containes Examples, it isn't necessary for the Examples to
duplicate this information.
  • Loading branch information
Paul Cochrane committed Apr 5, 2015
1 parent 459fb61 commit 197b08c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion lib/Perl6/Examples.pm
Expand Up @@ -6,7 +6,6 @@ use v6;
class Example is export {
has $.title is rw;
has $.author is rw;
has $.category is rw;
has $.filename is rw;
has $.pod-link is rw;
has $.pod-contents is rw;
Expand Down
2 changes: 0 additions & 2 deletions lib/Pod/Htmlify.pm6
Expand Up @@ -70,7 +70,6 @@ class Website is export {
my $example = Example.new(
title => $example-title,
author => $author,
category => $category-key,
filename => $file,
pod-link => $link,
pod-contents => $pod,
Expand Down Expand Up @@ -114,7 +113,6 @@ class Website is export {
my @rows = @examples.map: {[.pod-link, .title, .author]};
my $base-dir = $!base-html-dir ~ "/categories/" ~ $category-key;
my $output-file = $base-dir ~ "/$subcategory-key.html";
say $output-file;
spurt $output-file, self.p2h(
pod-with-title($title,
pod-table(@rows, headers => @headers),
Expand Down
6 changes: 1 addition & 5 deletions t/001-example-basic.t
Expand Up @@ -16,7 +16,6 @@ subtest {
my $example = Example.new(
title => "",
author => "",
category => "",
filename => "",
pod-link => "",
pod-contents => "",
Expand All @@ -25,7 +24,7 @@ subtest {
}, "Object instantiation";

subtest {
plan 6;
plan 5;

my $example = Example.new;
$example.title = "my title";
Expand All @@ -34,9 +33,6 @@ subtest {
$example.author = "bob";
is($example.author, "bob", "Can set author attribute");

$example.category = "Cookbook";
is($example.category, "Cookbook", "Can set category attribute");

$example.filename = "001-blah.pl";
is($example.filename, "001-blah.pl", "Can set filename attribute");

Expand Down

0 comments on commit 197b08c

Please sign in to comment.