Provides abstractions for protocol message metadata.
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
endPlease see the project releases for all releases.
We welcome contributions to this project.
- Fork it.
- 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.
To run the test suite:
bundle exec susTo make a new release:
bundle exec bake gem:release:patch # or minor or majorIn 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.
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.
- protocol-http provides HTTP message abstractions.
- protocol-multipart provides multipart message abstractions.