Sha256: 667a9c0ca744ffc315748742b68ba194087cd344dde5983abd9f06d401a859a4

Contents?: true

Size: 1.14 KB

Versions: 1

Compression:

Stored size: 1.14 KB

Contents

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://tggl.io/tggl-io-logo-white.svg">
    <img align="center" alt="Tggl Logo" src="https://tggl.io/tggl-io-logo-black.svg" width="200rem" />
  </picture>
</p>

<h1 align="center">Tggl Ruby SDK</h1>

<p align="center">
  The Ruby SDK can be used to evaluate flags and report usage to the Tggl API or a <a href="https://tggl.io/developers/evaluating-flags/tggl-proxy">proxy</a>.
</p>

<p align="center">
  <a href="https://tggl.io/">🔗 Website</a>
  •
  <a href="https://tggl.io/developers/sdks/ruby">📚 Documentation</a>
  •
  <a href="https://rubygems.org/gems/tggl">📦 RubyGem</a>
  •
  <a href="https://www.youtube.com/@Tggl-io">🎥 Videos</a>
</p>

## Usage

Install the dependency:

```bash
gem install tggl
```

Start evaluating flags:

```rb
require "tggl"
 
$client = Tggl::Client.new("YOUR_API_KEY")
 
# An API call to Tggl is performed here
$flags = $client.eval_context({
  userId: "abc",
  email: "foo@gmail.com",
  country: "FR",
  # ...
})
 
if $flags.is_active? "my-feature"
  # ...
end
 
if $flags.get "my-feature" == "Variation A"
  # ...
end
```

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tggl-1.0.1 README.md