cstock 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fa7fb1e0d445516a141f448825634dc47d7aba2f
4
- data.tar.gz: ba2c88cb28745dc7108b831144d53bdb3fdd4e12
3
+ metadata.gz: 615f343f858805af4578b63414fc2d905ba4b3ae
4
+ data.tar.gz: 762a099ff333152217feded200c7c6beed4001eb
5
5
  SHA512:
6
- metadata.gz: 5a4a4d642357bd4ac63fa29292640c5114b773e5ab627e9102ae344e7311d93bb6bb0614ff8f8e58a524e175b6b377234506afd961b7bcd2b7a1d33915ff7554
7
- data.tar.gz: 7637e232f51818a32f7f935d74eabbc2aff57a37fc455721840afcb8d2714c51705a0dea0cc521d94b77cc42e74e022290a3b12fe0e19308e785d0fe74e764a9
6
+ metadata.gz: a045d83ef63dd6967b514b226507d5a0ab2acb923e64ad9bc617472c20ae9970bf293746cb1d8a990e363b414bc893347a1f3dbe615cb6f3d6a04a2755640e9f
7
+ data.tar.gz: f95b08b8a0966901a09812ab547cc6681ba20ba63aa7560673a6abdddb7a0583d3259f0d069676326af910d2b8de2130dc01af31da2fb9914f43b6234a3b0399
data/lib/cstock/stock.rb CHANGED
@@ -41,7 +41,7 @@ module CStock
41
41
  def self.refresh(stock)
42
42
  quote(stock.code) do |data|
43
43
  FIELDS[1..-1].each_with_index do |field, index|
44
- stock.instance_variable_set("@#{field}", (data[index].nil? ? nil : data[index]))
44
+ stock.send("#{field}=".to_sym, (data[index].nil? ? nil : data[index]))
45
45
  end
46
46
  end
47
47
  end
@@ -1,4 +1,4 @@
1
1
  # =>CStock::VERSION
2
2
  module CStock
3
- VERSION = '0.2.2'
3
+ VERSION = '0.2.3'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cstock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aston Fu