package Ġbe . ren aud ra as . kotlin playground . business . use case Ċ Ċ import Ġbe . ren aud ra as . kotlin playground . business . model . Repository Ċ import Ġbe . ren aud ra as . kotlin playground . business . network . Api Manager Ċ import Ġbe . ren aud ra as . kotlin playground . business . network . response . to Repository Ċ import Ġio . reactivex . Observable Ċ Ċ class ĠGet Repositories UseCase ( val Ġuser : ĠString ) Ġ: ĠUse Case < List < Repository >> Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġexecute (): ĠObservable < List < Repository >> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠApi Manager . github Api . get Repositories ( user ). map Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġrepositories Ġ= Ġmutable ListOf < Repository >() ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . forEach Ġ{ Ġrepositories . add ( it . to Repository ()) Ġ} ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġrepositories ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }