mcoin 0.5.0 → 0.5.1

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: f48d0475fd19293eb845569a49414e431d56e622
4
- data.tar.gz: 3d0d3ca43e45323320de712262febb36042a0b64
3
+ metadata.gz: 19a3bd3a7e72530ae744f2791ba20c7a45862711
4
+ data.tar.gz: a7ec548ecb1e4626971d03d65525182399eb9f14
5
5
  SHA512:
6
- metadata.gz: 622eb8ec2a9286dea575d0706ead10e32c0b430cdaed1b33443f27c10606bdfd9094de00568b130227ff1f5568dad604c0e3c7d87944693a791e3e9ef5a1508c
7
- data.tar.gz: 47ec3006a6e331cc05978b3f0b65eb9e0dee0682bcff3271f4a26a6a3c16625640bd4ac5816b6485c87546b5e484c905876c6a1a6bafd63680237e12fcdc29f7
6
+ metadata.gz: 59b8730253f0be1c32be90671bdf5f1bf0c052a8c411c07d23894d776083058e0718e2b16ea237442b3e065a5963eb10a6d67acac797831d7666a3a12b0d9030
7
+ data.tar.gz: be70247fcffd214db3beb8b2b9224ae16c6d0019eac07b63efdb13484b60f3561841dc1b061da4fe43368e4f5db6088b2575d7cfb0d1139509457b41be6f870a
@@ -4,14 +4,14 @@ module Mcoin
4
4
  class Subscriber
5
5
  attr_reader :markets, :pairs
6
6
 
7
- def initialize(pairs = [], market = Market.available)
7
+ def initialize(pairs = [], markets = Market.available)
8
8
  @pairs = pairs_from(pairs)
9
- @markets = markets_from(market)
9
+ @markets = markets
10
10
  end
11
11
 
12
12
  def start(interval = 1, &block)
13
13
  loop do
14
- Parallel.async(markets, :fetch) do |result|
14
+ Parallel.async(markets_from(markets), :fetch) do |result|
15
15
  yield result.to_ticker
16
16
  end
17
17
  sleep interval
@@ -27,7 +27,7 @@ module Mcoin
27
27
  end
28
28
 
29
29
  def markets_from(picked)
30
- @markets ||= picked.map do |name|
30
+ picked.map do |name|
31
31
  pairs.map do |pair|
32
32
  Market
33
33
  .pick(name)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mcoin
4
- VERSION = '0.5.0'
4
+ VERSION = '0.5.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mcoin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - 蒼時弦也