Class: FakeBraintree::Registry
- Inherits:
-
Object
- Object
- FakeBraintree::Registry
- Defined in:
- lib/fake_braintree/registry.rb
Instance Attribute Summary collapse
-
#addresses ⇒ Object
Returns the value of attribute addresses.
-
#credit_cards ⇒ Object
Returns the value of attribute credit_cards.
-
#customers ⇒ Object
Returns the value of attribute customers.
-
#failures ⇒ Object
Returns the value of attribute failures.
-
#redirects ⇒ Object
Returns the value of attribute redirects.
-
#subscriptions ⇒ Object
Returns the value of attribute subscriptions.
-
#transactions ⇒ Object
Returns the value of attribute transactions.
Instance Method Summary collapse
- #clear! ⇒ Object
- #failure?(card_number) ⇒ Boolean
-
#initialize ⇒ Registry
constructor
A new instance of Registry.
Constructor Details
#initialize ⇒ Registry
Returns a new instance of Registry.
2 3 4 |
# File 'lib/fake_braintree/registry.rb', line 2 def initialize clear! end |
Instance Attribute Details
#addresses ⇒ Object
Returns the value of attribute addresses.
6 7 8 |
# File 'lib/fake_braintree/registry.rb', line 6 def addresses @addresses end |
#credit_cards ⇒ Object
Returns the value of attribute credit_cards.
6 7 8 |
# File 'lib/fake_braintree/registry.rb', line 6 def credit_cards @credit_cards end |
#customers ⇒ Object
Returns the value of attribute customers.
6 7 8 |
# File 'lib/fake_braintree/registry.rb', line 6 def customers @customers end |
#failures ⇒ Object
Returns the value of attribute failures.
6 7 8 |
# File 'lib/fake_braintree/registry.rb', line 6 def failures @failures end |
#redirects ⇒ Object
Returns the value of attribute redirects.
6 7 8 |
# File 'lib/fake_braintree/registry.rb', line 6 def redirects @redirects end |
#subscriptions ⇒ Object
Returns the value of attribute subscriptions.
6 7 8 |
# File 'lib/fake_braintree/registry.rb', line 6 def subscriptions @subscriptions end |
#transactions ⇒ Object
Returns the value of attribute transactions.
6 7 8 |
# File 'lib/fake_braintree/registry.rb', line 6 def transactions @transactions end |
Instance Method Details
#clear! ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/fake_braintree/registry.rb', line 9 def clear! @addresses = {} @customers = {} @subscriptions = {} @failures = {} @transactions = {} @redirects = {} @credit_cards = {} end |
#failure?(card_number) ⇒ Boolean
19 20 21 |
# File 'lib/fake_braintree/registry.rb', line 19 def failure?(card_number) @failures.keys.include?(card_number) end |