Sha256: c10ac4b750a77dec239a3c942a0b25c5660de98cede6dd5aa00767f5151ae7e5

Contents?: true

Size: 881 Bytes

Versions: 1

Compression:

Stored size: 881 Bytes

Contents

require 'yaml'
require 'matrix'
require 'erubis'

require 'nineteen/eighty/two/version'
require 'nineteen/eighty/two/spectrum'

require 'nineteen/eighty/two/decorators/run_length_encoder'

require 'nineteen/eighty/two/formatters/text_formatter'
require 'nineteen/eighty/two/formatters/json_formatter'
require 'nineteen/eighty/two/formatters/html_table_formatter'
require 'nineteen/eighty/two/formatters/svg_formatter'

module Nineteen
  module Eighty
    module Two
      class Span < Hash
        def initialize type, width
          self[type] = width
        end

        def type
          self.keys.first
        end

        def width
          self.values.first
        end
      end

      def self.templates_dir
        File.join File.dirname(__FILE__), 'two', 'templates'
      end
    end
  end
end

class Array
  def longest
    self.map { |i| i.length }.max
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nineteen-eighty-two-0.1.3 lib/nineteen/eighty/two.rb