Class: StocksInfo::Stocktwits
- Inherits:
-
Object
- Object
- StocksInfo::Stocktwits
- Defined in:
- lib/stocks-info/stocktwits.rb
Constant Summary collapse
- @@trending_url =
api page with trending data
"https://api.stocktwits.com/api/2/trending/symbols.json"
- @@trending_tickers =
[]
Instance Attribute Summary collapse
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(ticker) ⇒ Stocktwits
constructor
A new instance of Stocktwits.
Constructor Details
#initialize(ticker) ⇒ Stocktwits
Returns a new instance of Stocktwits.
5 6 7 8 9 |
# File 'lib/stocks-info/stocktwits.rb', line 5 def initialize(ticker) @url = "https://stocktwits.com/symbol/#{ticker}" @trending_url = "https://api.stocktwits.com/api/2/trending/symbols.json" @trending_tickers = [] end |
Instance Attribute Details
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/stocks-info/stocktwits.rb', line 3 def url @url end |
Class Method Details
.trending_tickers ⇒ Object
18 19 20 |
# File 'lib/stocks-info/stocktwits.rb', line 18 def self.trending_tickers @@trending_tickers end |
.trending_url ⇒ Object
14 15 16 |
# File 'lib/stocks-info/stocktwits.rb', line 14 def self.trending_url @@trending_url end |