Class: Bovespa::Stock

Inherits:
Object
  • Object
show all
Defined in:
lib/bovespa-prices.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#average_priceObject

Returns the value of attribute average_price.



8
9
10
# File 'lib/bovespa-prices.rb', line 8

def average_price
  @average_price
end

#codeObject

Returns the value of attribute code.



8
9
10
# File 'lib/bovespa-prices.rb', line 8

def code
  @code
end

#dateObject

Returns the value of attribute date.



8
9
10
# File 'lib/bovespa-prices.rb', line 8

def date
  @date
end

#last_priceObject

Returns the value of attribute last_price.



8
9
10
# File 'lib/bovespa-prices.rb', line 8

def last_price
  @last_price
end

#max_priceObject

Returns the value of attribute max_price.



8
9
10
# File 'lib/bovespa-prices.rb', line 8

def max_price
  @max_price
end

#min_priceObject

Returns the value of attribute min_price.



8
9
10
# File 'lib/bovespa-prices.rb', line 8

def min_price
  @min_price
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/bovespa-prices.rb', line 8

def name
  @name
end

#opening_priceObject

Returns the value of attribute opening_price.



8
9
10
# File 'lib/bovespa-prices.rb', line 8

def opening_price
  @opening_price
end

#variationObject

Returns the value of attribute variation.



8
9
10
# File 'lib/bovespa-prices.rb', line 8

def variation
  @variation
end

Instance Method Details

#to_sObject



10
11
12
# File 'lib/bovespa-prices.rb', line 10

def to_s
	"#{@code} - '#{@name}' #{@opening_price} #{@min_price} #{@max_price} #{@average_price} #{@last_price} #{@variation}"
end