Skip to content

Commit

Permalink
default link format
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Apr 22, 2009
1 parent b3f8554 commit 3d65c43
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
21 changes: 19 additions & 2 deletions lib/JiftyX/CloudTags.pm
Expand Up @@ -4,19 +4,36 @@ use warnings;
use strict;
use Mouse;


our $VERSION = '0.01';

has 'collection' => (is => 'rw', isa => 'Object');
has 'collection' => ( is => 'rw', isa => 'Object' );
has 'default_link_format' => (
is => 'rw',
isa => 'Str' ,
default => '${id} ${text}'
);

sub init {
sub set_tags {
my $self = shift;
my $collection = shift;
my %args = @_;
$self->collection( $collection );

# $args{text_by}
# text_by => 'name',
# size_by => 'related_posts',
# link_format => '',

my $link_format = $args{link_format} || $self->default_link_format;


}


sub render {
my $self = shift;
# $self->collection;
}

1;
Expand Down
6 changes: 2 additions & 4 deletions t/TestApp/t/00-model-Labels.t
Expand Up @@ -52,7 +52,5 @@ my $collection = M('LabelsCollection');
ok( $collection );
my $tgen = new JiftyX::CloudTags;
ok( $tgen );
$tgen->init( $collection );



$tgen->set_tags( $collection );
warn $tgen->render;

0 comments on commit 3d65c43

Please sign in to comment.