Sha256: ee3a7e0156a14852be2a1d1a2655c1187b0e6bd9fae94147a1a33a95e85f10b7

Contents?: true

Size: 821 Bytes

Versions: 13

Compression:

Stored size: 821 Bytes

Contents

module BrighterPlanet
  module Purchase
    class TestSectorDirectRequirementsAdapter
      def self.matrix
        Matrix[*data]
      end

      def self.data
        matrix_text = <<-MATRIX
|  X   |111000 |3991A0 |3991B0 |399200 |399900 |4A0000 |
|111000|1.11660|0.25159|0.37377|0.49894|0.52683|0.50533|
|3991A0|0.12526|1.22952|0.37011|0.49405|0.52167|0.50038|
|3991B0|0.15614|0.31060|1.43230|0.61617|0.64708|0.61527|
|399200|0.15464|0.30761|0.45699|1.57178|0.64085|0.60935|
|399900|0.18444|0.36693|0.54511|0.72808|1.71418|0.72007|
|4A0000|0.18270|0.36347|0.53997|0.72121|0.75461|1.65668|
        MATRIX
        lines = matrix_text.split(/\n/)
        lines.shift
        lines.map do |line|
          row = line.scan(/[A-Z\d\.]+/)
          row.shift
          row.map(&:to_f)
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
purchase-1.0.15 lib/test_support/test_sector_direct_requirements_adapter.rb
purchase-1.0.14 lib/test_support/test_sector_direct_requirements_adapter.rb
purchase-1.0.13 lib/test_support/test_sector_direct_requirements_adapter.rb
purchase-1.0.12 lib/test_support/test_sector_direct_requirements_adapter.rb
purchase-1.0.11 lib/test_support/test_sector_direct_requirements_adapter.rb
purchase-1.0.10 lib/test_support/test_sector_direct_requirements_adapter.rb
purchase-1.0.9 lib/test_support/test_sector_direct_requirements_adapter.rb
purchase-1.0.8 lib/test_support/test_sector_direct_requirements_adapter.rb
purchase-1.0.7 lib/test_support/test_sector_direct_requirements_adapter.rb
purchase-1.0.6 lib/test_support/test_sector_direct_requirements_adapter.rb
purchase-1.0.5 lib/test_support/test_sector_direct_requirements_adapter.rb
purchase-1.0.4 lib/test_support/test_sector_direct_requirements_adapter.rb
purchase-1.0.3 lib/test_support/test_sector_direct_requirements_adapter.rb