Browse files

Making default options actually work when using plan

  • Loading branch information...
1 parent d62c4c1 commit 9db1cf234e692ac48e36e80ba7d801dd54a9fcc5 @chendo committed Jan 6, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/metlinkr/journey.rb
View
4 lib/metlinkr/journey.rb
@@ -9,10 +9,10 @@ class Journey
attr_reader :from, :to, :options, :trips
- def initialize(from, to, options = {:methods => :all, :ignore_earlier_trip => true, :limit => 1})
+ def initialize(from, to, options = nil)
@from = from
@to = to
- @options = options
+ @options = options || {:methods => :all, :ignore_earlier_trip => true, :limit => 1}
end
def plan

0 comments on commit 9db1cf2

Please sign in to comment.