How do I call a method from a class in a ruby gem?
i.e.
gem install mindbody
In the gem’s documentation, I see various classes. But no guideline on how to call these classes from code.
For example, I’d like to call a method in the ClassService class.
For MindBody look at root Module Mb.
You can list all types declared using:
It gives you:
["AppointmentService", "SourceCredentials", "Meta", "StaffService", "Options", "SiteService", "StaffOptions", "Credentials", "ClientService", "ClassService", "SaleService", "Service"]After you can call
Mb::ClassService.neworinclude Mb; ClassService.newA little bit of metaprogramming for you