Class: Polygon::Stream
- Inherits:
-
Object
- Object
- Polygon::Stream
- Defined in:
- lib/polygon.rb
Overview
Your code goes hereā¦
Constant Summary collapse
- DEFAULT_WATCH =
"MSFT TSLA AAPL AMZN GOOGL BRK.A FB BABA TCEHY JPM JNJ V XOM IDCBF".split(' ')
Instance Method Summary collapse
-
#initialize(auth, stream = 'stocks') ⇒ Stream
constructor
A new instance of Stream.
- #listen ⇒ Object
Constructor Details
#initialize(auth, stream = 'stocks') ⇒ Stream
Returns a new instance of Stream.
22 23 24 |
# File 'lib/polygon.rb', line 22 def initialize auth, stream='stocks' @pi = PolygonInterface.new auth, stream end |
Instance Method Details
#listen ⇒ Object
26 27 28 29 30 |
# File 'lib/polygon.rb', line 26 def listen @pi.run @pi.sub DEFAULT_WATCH @pi.thread.join end |