lib/bovespa-prices.rb in bovespa-prices-1.0.1 vs lib/bovespa-prices.rb in bovespa-prices-1.0.2

- old
+ new

@@ -1,10 +1,10 @@ require 'httpclient' require 'nokogiri' class Bovespa - VERSION = "1.0.1" + VERSION = "1.0.2" class Stock attr_accessor :code, :name, :date, :opening_price, :min_price, :max_price, :average_price, :last_price, :variation def to_s @@ -29,8 +29,8 @@ st.code = p['Codigo'] result[st.code.to_sym] = st end - result + return (stock_codes.size > 1 ? result : result[stock_codes.first]) end end \ No newline at end of file