Sha256: 5a57245b120880db65a2866ace39de87ab35a015f1a2d8ba733cd32cb6494229

Contents?: true

Size: 377 Bytes

Versions: 1

Compression:

Stored size: 377 Bytes

Contents

module Werd
  module Reports
    class Basic
      include Contracts
      attr_reader :words

      Contract ArrayOf[[String, Num]] => 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.1 lib/werd/reports/basic.rb