Class: StockMarkit::Stock

Inherits:
Object
  • Object
show all
Defined in:
lib/stock-markit/stock.rb

Overview

Stock Object

Copyright

Copyright © 2016 Michael Heijmans

License

MIT

Author:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(symbol, name, exchange = nil) ⇒ Stock


19
20
21
22
23
# File 'lib/stock-markit/stock.rb', line 19

def initialize(symbol, name, exchange=nil)
  @symbol   = symbol
  @name     = name
  @exchange = exchange
end

Instance Attribute Details

#exchangeString (readonly)

The exchange the stock is traded on


13
14
15
# File 'lib/stock-markit/stock.rb', line 13

def exchange
  @exchange
end

#nameString (readonly)

The company name


13
14
15
# File 'lib/stock-markit/stock.rb', line 13

def name
  @name
end

#symbolString (readonly)

The Stock Symbol


13
14
15
# File 'lib/stock-markit/stock.rb', line 13

def symbol
  @symbol
end