Permalink
Browse files

Use mattr_accessor.

  • Loading branch information...
1 parent 8dde09c commit ab93137eb58e736b24cb96c94cec1e44dd084403 Gabe Berke-Williams committed Dec 16, 2011
Showing with 3 additions and 11 deletions.
  1. +3 −11 lib/fake_braintree.rb
View
@@ -3,6 +3,7 @@
require 'capybara'
require 'capybara/server'
require 'rack/handler/mongrel'
+require 'active_support/core_ext/module/attribute_accessors'
require 'fake_braintree/helpers'
require 'fake_braintree/customer'
@@ -14,17 +15,8 @@
require 'fake_braintree/version'
module FakeBraintree
- class << self
- @customers = {}
- @subscriptions = {}
- @failures = {}
- @transactions = {}
- @redirects = {}
-
- @decline_all_cards = false
- @verify_all_cards = false
- attr_accessor :customers, :subscriptions, :failures, :transactions, :decline_all_cards, :verify_all_cards, :redirects
- end
+ mattr_accessor :customers, :subscriptions, :failures, :transactions, :verify_all_cards, :decline_all_cards, :redirects
+ verify_all_cards = false
def self.activate!
set_configuration

0 comments on commit ab93137

Please sign in to comment.