quandl_data 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -52,6 +52,20 @@ module Operations
52
52
  self
53
53
  end
54
54
 
55
+ def trim_start(date)
56
+ date = Date.parse(date) if date.is_a?(String)
57
+ date = date.jd if date.respond_to?(:jd)
58
+ index = data_array.rindex{|r| r[0] == date }
59
+ @data_array = @data_array[index..-1]
60
+ end
61
+
62
+ def trim_end(date)
63
+ date = Date.parse(date) if date.is_a?(String)
64
+ date = date.jd if date.respond_to?(:jd)
65
+ index = data_array.rindex{|r| r[0] == date }
66
+ @data_array = @data_array[0..index]
67
+ end
68
+
55
69
  def limit(amount)
56
70
  @data_array = data_array[0..( amount.to_i - 1 )] if amount.present?
57
71
  self
@@ -1,5 +1,5 @@
1
1
  module Quandl
2
2
  module Data
3
- VERSION = "0.0.9"
3
+ VERSION = "0.0.10"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quandl_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-18 00:00:00.000000000 Z
12
+ date: 2013-07-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake