Module: PagSeguro::Extensions::EnsureType
- Included in:
- Account, AuthorizationRequest, Company, CollectionObject, Holder, ManualSubscriptionCharger, PaymentRelease, PaymentReleases, PaymentRequest, Person, Receiver, ReceiverSplit, Sender, Shipping, Subscription, SubscriptionChangePayment, SubscriptionPaymentMethod, SubscriptionPaymentOrder, SubscriptionPlan, Transaction, TransactionRequest
- Defined in:
- lib/pagseguro/extensions/ensure_type.rb
Instance Method Summary collapse
Instance Method Details
#ensure_type(klass, options = {}) ⇒ Object
4 5 6 |
# File 'lib/pagseguro/extensions/ensure_type.rb', line 4 def ensure_type(klass, = {}) .kind_of?(klass) ? : klass.new() end |