class TopStockMovers::Stocks

Attributes

category[RW]
change[RW]
market_cap[RW]
name[RW]
percent_change[RW]
price[RW]
rating[RW]
sector[RW]
ticker_symbol[RW]
url[RW]
volume[RW]

Public Class Methods

all() click to toggle source
# File lib/top_stock_movers/stocks.rb, line 10
def self.all
  @@all
end
find_by_category(category) click to toggle source
# File lib/top_stock_movers/stocks.rb, line 14
def self.find_by_category(category)
  @@all.select {|stock| stock.category == category}
end
new() click to toggle source
# File lib/top_stock_movers/stocks.rb, line 6
def initialize
  @@all << self
end