Sha256: 890f155e03eda7223409f99e8167f6a39e11dc6c842b8cf7a5602596068fc009

Contents?: true

Size: 458 Bytes

Versions: 3

Compression:

Stored size: 458 Bytes

Contents

# Author::    Nicolas Pouillard  <ertai@lrde.epita.fr>.
# Copyright:: Copyright (c) 2004, 2005 Uttk team. All rights reserved.
# License::   LGPL
# $Id: /w/fey/uttk/trunk/lib/uttk/weights/WFloat.rb 8778 2005-09-26T04:34:48.103938Z ertai  $


module Uttk

  module Weights

    class WFloat < Weight

      def get
        return to_f if nan?
        (to_f * 100).floor.to_s + '%'
      end

    end # class WFloat

  end # module Weights

end # module Uttk

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
uttk-0.4.6.2 lib/uttk/weights/WFloat.rb
uttk-0.4.5.0 lib/uttk/weights/WFloat.rb
uttk-0.4.6.1 lib/uttk/weights/WFloat.rb