source: branches/UKMO/r6232_tracer_advection/NEMOGCM/EXTERNAL/fcm/lib/Fcm/Keyword/Formatter/Entry.pm @ 9295

Last change on this file since 9295 was 9295, checked in by jcastill, 3 years ago

Remove svn keywords

File size: 1.3 KB
Line 
1# ------------------------------------------------------------------------------
2# (C) Crown copyright Met Office. All rights reserved.
3# For further details please refer to the file COPYRIGHT.txt
4# which you should have received as part of this distribution.
5# ------------------------------------------------------------------------------
6use strict;
7use warnings;
8
9package Fcm::Keyword::Formatter::Entry;
10
11################################################################################
12# Constructor
13sub new {
14    my ($class) = @_;
15    return bless(\do{my $annon_scalar}, $class);
16}
17
18################################################################################
19# Formats a keyword entry
20sub format {
21    my ($self, $entry) = @_;
22    return sprintf("%s = %s\n", $entry->get_key(), $entry->get_value());
23}
24
251;
26__END__
27
28=head1 NAME
29
30Fcm::Keyword::Formatter::Entry
31
32=head1 SYNOPSIS
33
34    use Fcm::Keyword::Formatter::Entry;
35    $formatter = Fcm::Keyword::Formatter::Entry->new();
36    print($formatter->format($entry));
37
38=head1 DESCRIPTION
39
40An object of this class is used to format a keyword entry.
41
42=head1 METHODS
43
44=over 4
45
46=item new()
47
48Constructor.
49
50=item format($entry)
51
52Returns a simple string representation of $entry.
53
54=back
55
56=head1 SEE ALSO
57
58L<Fcm::Keyword::Entry|Fcm::Keyword::Entry>
59
60=head1 COPYRIGHT
61
62E<169> Crown copyright Met Office. All rights reserved.
63
64=cut
Note: See TracBrowser for help on using the repository browser.