quandl_operation 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e89e08ff1940b2194533fe1d0f0a7a03f46b9c92
4
- data.tar.gz: dfe19700498fba23c32aef762056a119a1cf5d82
3
+ metadata.gz: 6530a186534168df1225e1db42cdc01e73bc4b9d
4
+ data.tar.gz: 4aed60d64fc25da6b8cd240a01e9d8238bffe560
5
5
  SHA512:
6
- metadata.gz: b23ff8da2b7aaf4257c055c2cfaa5c6c761f716f8fd62c8dcc0010ef9eb8faaef2012ae9de6d357dc4b0a80bb6a399035fe40b25ac9333a6b754f5bcde9dda0f
7
- data.tar.gz: 41d60de79f17b6474c09254c56a9d1cdd137a1ffb2c3f8d9c56bf4378e5cb73ae645c77118c543eb5622dcdeaa132412d647d2e848128c42507dabbd3e6cae97
6
+ metadata.gz: d05bddb5882c358217a122c9efd78d4a55c1d64c356711bb3e156b940cf99d14ad419b0b74d3ce92e6a403deda13e475bca570c309c9e0768c79cd37f760576c
7
+ data.tar.gz: e1a6baf5c8586ee53136f6cef160d63db64cd75322a5333bebf813f5720fb24548e0fffea78482dbf8dfa52e3ea3cccbe353be0302c23f24688fc24add9d413f
@@ -11,6 +11,7 @@ class Collapse
11
11
  def perform(data, frequency)
12
12
  data = Parse.sort( data )
13
13
  data = collapse_and_log(data, frequency)
14
+
14
15
  data
15
16
  end
16
17
 
@@ -35,9 +36,15 @@ class Collapse
35
36
  # consider the value for the next range
36
37
  collapsed_data[range] = value if inside_range?(date, range) && value.present?
37
38
  end
38
- collapsed_data
39
+ to_table(collapsed_data)
39
40
  end
40
-
41
+
42
+ def to_table(data)
43
+ data.collect do |date, values|
44
+ values.unshift(date)
45
+ end
46
+ end
47
+
41
48
  def frequency?(data)
42
49
  Guess.frequency(data)
43
50
  end
@@ -1,5 +1,5 @@
1
1
  module Quandl
2
2
  module Operation
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quandl_operation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blkae Hilscher