Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

rubygems.org : deconstructable

This gem provides Deconstructable, a mixin module that helps you to support pattern-matching over your types. Usage -------- ``` class Thing include Deconstructable ... deconstructable :x, :y deconstructable def foo do_the_foo end end ``` This class provides a single DSL method `deconstructable` which helps you to mark methods and attributes as deconstructable. Deconstructable attributes will be made available in pattern matching, e.g.: ``` thing in Thing(foo:, x: 100, y:) ``` Classes that include `Deconstructable` gain an implementation of `deconstruct_keys` that permits hash-style key based pattern matching. Positional array-style patterns are not supported.

Registry - Source - Homepage - Documentation - JSON
purl: pkg:gem/deconstructable
License: MIT
Latest release: about 4 years ago
First release: about 4 years ago
Dependent repositories: 1
Downloads: 1,940 total
Stars: 0 on GitLab.com
Forks: 1 on GitLab.com
See more repository details: repos.ecosyste.ms
Last synced: 15 days ago

    Loading...
    Readme
    Loading...