Skip to content

Commit

Permalink
Prefer symbols for ticker symbols (imagine that)
Browse files Browse the repository at this point in the history
  • Loading branch information
brymck committed Sep 30, 2011
1 parent f2c3872 commit adf12e1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.rdoc
Expand Up @@ -55,7 +55,7 @@ Fargo using the following (note that you only need to <tt>require</tt> the
<tt>quote</tt> module):

require "rupee/quote"
wfc = Rupee::Quote.new("WFC")
wfc = Rupee::Quote.new(:wfc)

wfc.get :price, :change, :pct_chg
#=> {:price=>24.96, :change=>0.17, :pct_chg =>0.686}
Expand Down
Empty file added lib/rupee/generators/install.rb
Empty file.
8 changes: 4 additions & 4 deletions lib/rupee/quote.rb
Expand Up @@ -10,7 +10,7 @@ module Rupee
#
# require "rupee/quote"
#
# wfc = Rupee::Quote.new("WFC")
# wfc = Rupee::Quote.new(:wfc)
#
# wfc.get :price, :change, :pct_chg
# #=> {:price=>24.96, :change=>0.17, :pct_chg =>0.686}
Expand All @@ -35,11 +35,11 @@ class Quote

# Creates a new Rupee::Quote object.
#
# wfc = Rupee::Quote.new("WFC")
# wfc = Rupee::Quote.new(:wfc)
#
# is equivalent to
#
# wfc = Rupee::Quote.new("WFC", :source => :bloomberg, :frequency => 15)
# wfc = Rupee::Quote.new(:wfc, :source => :bloomberg, :frequency => 15)
#
# Configuration options
#
Expand All @@ -51,7 +51,7 @@ class Quote
# quote source, in seconds (default is +15+).
def initialize(ticker, opts = {})
opts = { :source => :bloomberg, :frequency => 15 }.merge opts
@ticker = ticker
@ticker = ticker.upcase
@source = Quote.sources[opts[:source]]
@frequency = opts[:frequency]
@next_pull = Time.now
Expand Down
2 changes: 1 addition & 1 deletion lib/rupee/version.rb
@@ -1,4 +1,4 @@
module Rupee
# The current version
VERSION = "0.2.2"
VERSION = "0.2.3"
end
2 changes: 1 addition & 1 deletion spec/ruby/quote_spec.rb
Expand Up @@ -8,7 +8,7 @@
describe "when pulling quotes" do
describe "without any parameters specified" do
before :each do
@wfc = Quote.new("WFC")
@wfc = Quote.new(:wfc)
end

it "should default to pulling the price" do
Expand Down

0 comments on commit adf12e1

Please sign in to comment.