This question is based on another thread that helped me realize the
initial idea I had about a library format was not good.
How is it possible to mimic an ActiveRecord association like class
Class Resource < Main
and being able to create something like
con = Main.new(user, pass)
result = con.resources.method
Sorry for opening another thread about this.