Sha256: cd887dfc17841166fe1d8dfa67e0e947b75a15b4f71a87cb02ec9b43118962f9

Contents?: true

Size: 363 Bytes

Versions: 1

Compression:

Stored size: 363 Bytes

Contents

module Werd
  module Reports
    class Basic
      include Contracts
      attr_reader :words

      Contract WordList => Any
      def initialize words
        @words = words.first(30)
      end

      Contract None => String
      def to_s
        words.map do |row|
          "%4i %s" % [row.last, row.first]
        end.join("\n")
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
werd-0.0.2 lib/werd/reports/basic.rb