Class: Finviz
Instance Attribute Summary collapse
-
#authenticated ⇒ Object
Returns the value of attribute authenticated.
Instance Method Summary collapse
- #indices ⇒ Object
-
#initialize(username = nil, password = nil) ⇒ Finviz
constructor
A new instance of Finviz.
- #screener(params) ⇒ Object
- #series(symbol, params) ⇒ Object
- #url(params) ⇒ Object
Constructor Details
#initialize(username = nil, password = nil) ⇒ Finviz
Returns a new instance of Finviz.
9 10 11 12 13 |
# File 'lib/finviz_rails/finviz.rb', line 9 def initialize(username=nil, password=nil) @username = ENV['FINVIZ_USERNAME'] || username @password = ENV['FINVIZ_PASSWORD'] || password login if @username && @password end |
Instance Attribute Details
#authenticated ⇒ Object
Returns the value of attribute authenticated.
7 8 9 |
# File 'lib/finviz_rails/finviz.rb', line 7 def authenticated @authenticated end |
Instance Method Details
#indices ⇒ Object
19 20 21 |
# File 'lib/finviz_rails/finviz.rb', line 19 def indices Indices.new(agent, @authenticated).run end |
#screener(params) ⇒ Object
15 16 17 |
# File 'lib/finviz_rails/finviz.rb', line 15 def screener(params) Screener.new(agent, @authenticated, params).run end |
#series(symbol, params) ⇒ Object
27 28 29 |
# File 'lib/finviz_rails/finviz.rb', line 27 def series(symbol, params) Series.new(symbol, params, agent).run end |
#url(params) ⇒ Object
23 24 25 |
# File 'lib/finviz_rails/finviz.rb', line 23 def url(params) UrlFormatter.new(nil, nil, params, nil).run end |