Sha256: abd3193fd71574a910a96a733a0b1cf48510fff721a0f75db1dc49145dd91fd2

Contents?: true

Size: 1001 Bytes

Versions: 8

Compression:

Stored size: 1001 Bytes

Contents

require "date"
require "time"
require "ostruct"

IPhones = [
  ["iPhone",         "2007-06-29", [4,8,16]],
  ["iPhone 3G",      "2008-07-11", [8,16]],
  ["iPhone 3GS",     "2009-06-19", [8,16,32]],
  ["iPhone 4",       "2010-06-24", [8,16,32]],
  ["iPhone 4S",      "2011-10-14", [8,16,32,64]],
  ["iPhone 5",       "2012-09-21", [16,32,64]],
  ["iPhone 5C",      "2013-09-20", [8,16,32]],
  ["iPhone 5S",      "2013-09-20", [16,32,64]],
  ["iPhone 6",       "2014-09-19", [16,64,128]],
  ["iPhone 6 Plus",  "2014-09-19", [16,64,128]],
  ["iPhone 6S",      "2015-09-25", [16,32,64,128]],
  ["iPhone 6S Plus", "2015-09-25", [16,32,64,128]],
  ["iPhone SE",      "2016-03-31", [16,64]],
  ["iPhone 7",       "2016-09-16", [32,128,256]],
  ["iPhone 7 Plus",  "2016-09-16", [32,128,256]],
].map{|n,d,s|
  OpenStruct.new(name: n, released: Time.parse(d), sizes: s)
}

IPhoneVariants = IPhones.flat_map do |i|
  i.sizes.map do |sz|
    OpenStruct.new(name: i.name, released: i.released, size: sz)
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
hyper-d3-1.0.0.lap28 spec/test_app/app/assets/javascripts/data/iphones.rb
hyper-d3-1.0.0.lap27 spec/test_app/app/assets/javascripts/data/iphones.rb
hyper-d3-1.0.0.lap26 spec/test_app/app/assets/javascripts/data/iphones.rb
hyper-d3-1.0.0.lap25 spec/test_app/app/assets/javascripts/data/iphones.rb
hyper-d3-1.0.0.lap24 spec/test_app/app/assets/javascripts/data/iphones.rb
hyper-d3-1.0.0.lap23 spec/test_app/app/assets/javascripts/data/iphones.rb
opal-d3-0.0.20170822 demo/app/data/iphones.rb
opal-d3-0.0.20170205 demo/app/data/iphones.rb