How To Install rubygem-contracts on Fedora 36

In this tutorial we learn how to install rubygem-contracts in Fedora 36. rubygem-contracts is Contracts for Ruby

Introduction

In this tutorial we learn how to install rubygem-contracts on Fedora 36.

What is rubygem-contracts

This library provides contracts for Ruby. Contracts let you clearly express how your code behaves, and free you from writing tons of boilerplate, defensive code.

We can use yum or dnf to install rubygem-contracts on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install rubygem-contracts.

Install rubygem-contracts on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install rubygem-contracts using dnf by running the following command:

sudo dnf -y install rubygem-contracts

Install rubygem-contracts on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install rubygem-contracts using yum by running the following command:

sudo yum -y install rubygem-contracts

How To Uninstall rubygem-contracts on Fedora 36

To uninstall only the rubygem-contracts package we can use the following command:

sudo dnf remove rubygem-contracts

rubygem-contracts Package Contents on Fedora 36

/usr/share/gems/gems/contracts-0.17
/usr/share/gems/gems/contracts-0.17/CHANGELOG.markdown
/usr/share/gems/gems/contracts-0.17/LICENSE
/usr/share/gems/gems/contracts-0.17/README.md
/usr/share/gems/gems/contracts-0.17/TODO.markdown
/usr/share/gems/gems/contracts-0.17/TUTORIAL.md
/usr/share/gems/gems/contracts-0.17/lib
/usr/share/gems/gems/contracts-0.17/lib/contracts
/usr/share/gems/gems/contracts-0.17/lib/contracts.rb
/usr/share/gems/gems/contracts-0.17/lib/contracts/attrs.rb
/usr/share/gems/gems/contracts-0.17/lib/contracts/builtin_contracts.rb
/usr/share/gems/gems/contracts-0.17/lib/contracts/call_with.rb
/usr/share/gems/gems/contracts-0.17/lib/contracts/core.rb
/usr/share/gems/gems/contracts-0.17/lib/contracts/decorators.rb
/usr/share/gems/gems/contracts-0.17/lib/contracts/engine
/usr/share/gems/gems/contracts-0.17/lib/contracts/engine.rb
/usr/share/gems/gems/contracts-0.17/lib/contracts/engine/base.rb
/usr/share/gems/gems/contracts-0.17/lib/contracts/engine/eigenclass.rb
/usr/share/gems/gems/contracts-0.17/lib/contracts/engine/target.rb
/usr/share/gems/gems/contracts-0.17/lib/contracts/errors.rb
/usr/share/gems/gems/contracts-0.17/lib/contracts/formatters.rb
/usr/share/gems/gems/contracts-0.17/lib/contracts/invariants.rb
/usr/share/gems/gems/contracts-0.17/lib/contracts/method_handler.rb
/usr/share/gems/gems/contracts-0.17/lib/contracts/method_reference.rb
/usr/share/gems/gems/contracts-0.17/lib/contracts/support.rb
/usr/share/gems/gems/contracts-0.17/lib/contracts/validators.rb
/usr/share/gems/gems/contracts-0.17/lib/contracts/version.rb
/usr/share/gems/specifications/contracts-0.17.gemspec

References

Summary

In this tutorial we learn how to install rubygem-contracts on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).