This is the core functionality for implementing a mesh-chat compatible client in ruby
See Spiced Rumby (GUI wrapper around this gem)
In order to use meshchat with your own interface, you only need to pass in your own implementation of Display::Base
Optionally, you may pass in a notifier to have the mesh-chat trigger notifications for your system
Meshchat.start(
# name of your client
client_name: Meshchat.name,
# version of your client
client_version: Meshchat::VERSION,
# your class implementing `Meshchat::Ui::Display::Base`
display: Meshchat::Ui::Display::Base,
# your class implementing `Meshchat::Ui::CLI::Base`
input: Meshchat::Ui::CLI::KeyboardLineInput,
# (optional) your class implementing `Notifier::Base`
# typically, this hooks in to libnotify on *nix
notifier: Meshchat::Ui::Notifier::Base,
)
For a lightweight, runnable sample for how to invoke this, see the included run
script.
./run
rspec
loco