diff options
Diffstat (limited to 'lib/puppet/interface.rb')
| -rw-r--r-- | lib/puppet/interface.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/puppet/interface.rb b/lib/puppet/interface.rb index 5e9355061..4a36b509a 100644 --- a/lib/puppet/interface.rb +++ b/lib/puppet/interface.rb @@ -70,9 +70,16 @@ class Puppet::Interface attr_accessor :summary def summary(value = nil) - @summary = value unless value.nil? + value.nil? or summary = value @summary end + def summary=(value) + value = value.to_s + value =~ /\n/ and + raise ArgumentError, "Face summary should be a single line; put the long text in 'description' instead." + + @summary = value + end attr_reader :name, :version |
