mercredi 26 juillet 2017

Adapter Pattern in ruby

I know what is adapter(theoretically),but i do not know how to implement in ruby.How to implement the adapter pattern,when adaptor is inheriting target .There are few doubts:

  1. How we can able to pass the newly generated object of adaptee to adaptor.
  2. How adaptor will use the object of target to generate an object containing the data of adaptee .

Please provide an example. Thank you!!

Aucun commentaire:

Enregistrer un commentaire