Class: Minfraud::Components::Base
- Inherits:
-
Object
- Object
- Minfraud::Components::Base
- Defined in:
- lib/minfraud/components/base.rb
Overview
Note:
This class is used as a parent class for all other components
Note:
It defines a method which is used for basic JSON representation of PORO objects
Direct Known Subclasses
Account, Addressable, CreditCard, CustomInputs, Device, Email, Event, Order, Payment, Report::Transaction, ShoppingCart, ShoppingCartItem
Instance Method Summary collapse
-
#to_json(*_args) ⇒ Hash
A JSON representation of component attributes.
Instance Method Details
#to_json(*_args) ⇒ Hash
Returns a JSON representation of component attributes.
9 10 11 |
# File 'lib/minfraud/components/base.rb', line 9 def to_json(*_args) instance_variables.reduce({}) { |mem, e| populate!(mem, e) } end |