M
Matt Berney
We have been using Ruby/Watir for quite some time now. It is a useful
combination. The object-oriented nature of Ruby with Modules, classes
and mixins works really well.
Now my dilema...
Currently we have one database object that implements methods for
customers, payment devices, and sva (Stored Value Accounts).
d = Database.new
d.getCustomerIDByOrder
d.customerBlacklisted?
d.customerValidated?
d.getPaymentDeviceByOrder
d.paymentDeviceBlacklisted?
d.paymentDeviceValidated?
d.getSvaIDByOrder
d.svaBlacklisted?
d.svaValidated?
What is a good way to create an object that publishes common interfaces
that calls the device specific methods as appropriate?
Something like ...
getIDByOrder(), blacklisted?(), validated?()
But, how to create the hierarchy to call the appropriate low level
primitives?
Perhaps have a Customer object, PaymentDevice object, and Sva object
that each publishes their own interfaces. But, then what next?
TIA
combination. The object-oriented nature of Ruby with Modules, classes
and mixins works really well.
Now my dilema...
Currently we have one database object that implements methods for
customers, payment devices, and sva (Stored Value Accounts).
d = Database.new
d.getCustomerIDByOrder
d.customerBlacklisted?
d.customerValidated?
d.getPaymentDeviceByOrder
d.paymentDeviceBlacklisted?
d.paymentDeviceValidated?
d.getSvaIDByOrder
d.svaBlacklisted?
d.svaValidated?
What is a good way to create an object that publishes common interfaces
that calls the device specific methods as appropriate?
Something like ...
getIDByOrder(), blacklisted?(), validated?()
But, how to create the hierarchy to call the appropriate low level
primitives?
Perhaps have a Customer object, PaymentDevice object, and Sva object
that each publishes their own interfaces. But, then what next?
TIA