Skip to content

Toggle method #12

@kochka

Description

@kochka

Hello,

I would be nice to have a toggle method that took a bool in addition to the set_low and set_hight methods.
Very often I'm writing things like

RPi::GPIO.send(state ? :set_high : :set_low, gpio)

It could event toggle the state if no bool is provided but it's less needed.
What do you think ?

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions