Messaging system.
Add this line to your application's Gemfile:
gem 'chatbox'
And then execute:
$ bundle
Or install it yourself as:
$ gem install chatbox
Person = Struct.new :chatbox_id
austin = Person.new 1
rachel = Person.new 2
Chatbox.deliver_message! from: austin, to: rachel, body: 'Hello! How are you?'
messages = Chatbox.find_messages_to rachel
message = messages[0]
message.body # 'Hello! How are you?'
messages = Chatbox.find_messages_from austin
message = messages[0]
message.body # 'Hello! How are you?'
- Fork it ( https://github.com/[my-github-username]/chatbox/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request