Sha256: 4236080cb2493027d0e7c0e97b1cfc1f71edebf8cde627ac3bdb4b687e7fc870

Contents?: true

Size: 341 Bytes

Versions: 5

Compression:

Stored size: 341 Bytes

Contents

module WhirledPeas
  module Graphics
    class TextDimensions
      attr_reader :outer_width, :outer_height

      def initialize(content)
        @outer_width = 0
        content.each do |line|
          @outer_width = line.length if line.length > @outer_width
        end
        @outer_height = content.length
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
whirled_peas-0.8.0 lib/whirled_peas/graphics/text_dimensions.rb
whirled_peas-0.7.1 lib/whirled_peas/graphics/text_dimensions.rb
whirled_peas-0.7.0 lib/whirled_peas/graphics/text_dimensions.rb
whirled_peas-0.6.0 lib/whirled_peas/graphics/text_dimensions.rb
whirled_peas-0.5.0 lib/whirled_peas/graphics/text_dimensions.rb