Skip to content

Repository files navigation

Protocol::Message

Provides abstractions for protocol message metadata.

Development Status

Usage

require "protocol/message"

policy = Protocol::Message::Policy.new(
	{"tag" => Protocol::Message::Multiple}
)

metadata = Protocol::Message::Metadata.new(
	[["Name", "example"], ["Tag", "one"], ["Tag", "two"]],
	policy: policy
)

metadata["name"] # => "example"
metadata["tag"] # => ["one", "two"]

Trailer support is optional and can be added to a metadata specialization:

class Headers < Protocol::Message::Metadata
	include Protocol::Message::Trailers
end

Releases

Please see the project releases for all releases.

Contributing

We welcome contributions to this project.

  1. Fork it.
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Add some feature.').
  4. Push to the branch (git push origin my-new-feature).
  5. Create a new pull request.

Running Tests

To run the test suite:

bundle exec sus

Making Releases

To make a new release:

bundle exec bake gem:release:patch # or minor or major

Developer Certificate of Origin

In order to protect users of this project, we require all contributors to comply with the Developer Certificate of Origin. This ensures that all contributions are properly licensed and attributed.

Community Guidelines

This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.

See Also

About

Provides abstractions for protocol message metadata.

Resources

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages