Skip to content

Commit

Permalink
Remove unused Carrier#setup method
Browse files Browse the repository at this point in the history
  • Loading branch information
Cody Fauser committed Mar 11, 2009
1 parent a205182 commit b4d673f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* Remove unused Carrier#setup method [cody]
* Don't use Array splat in Regex comparisons in Package [cody]
* Default the Location to use the :alpha2 country code format [cody]
* Add configurable timeouts from Active Merchant [cody]
Expand Down
9 changes: 1 addition & 8 deletions lib/active_shipping/shipping/carrier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,14 @@ class Carrier
attr_accessor :test_mode
alias_method :test_mode?, :test_mode

# Override 'setup' method instead of 'initialize' in subclasses for most cases.
# Credentials should be in options hash under keys :login, :password and/or :key.
def initialize(options = {})
requirements.each {|key| requires!(options, key)}
@options = options
@last_request = nil
@test_mode = @options[:test]
setup
end

# Override to put any initializing code you want in this method; it gets called at the end of initialize.
def setup

end


# Override to return required keys in options hash for initialize method.
def requirements
[]
Expand Down

0 comments on commit b4d673f

Please sign in to comment.