Sha256: f80b894c1b10812006b81b34aea226c6f0472483f25ac3cbab121e51acce928f

Contents?: true

Size: 825 Bytes

Versions: 17

Compression:

Stored size: 825 Bytes

Contents

# Flipper read-only

A [read-only](https://github.com/jnunemaker/flipper/blob/master/lib/flipper/adapters/read_only.rb) adapter for [Flipper](https://github.com/jnunemaker/flipper).

Use this adapter to wrap another adapter and raise an exception for any writes.

Any attempted write raises `Flipper::Adapters::ReadOnly::WriteAttempted`  with message  `'write attempted while in read only mode'`
## Usage
```ruby
# example wrapping memory adapter
require 'flipper/adapters/memory'
require 'flipper/adapters/read_only'

memory_adapter = Flipper::Adapters::Memory.new
read_only_adapter = Flipper::Adapters::ReadOnly.new(memory_adapter)

flipper = Flipper.new(read_only_adapter)

# Enabling a feature
> flipper[:dashboard_panel].enable
=> Flipper::Adapters::ReadOnly::WriteAttempted: write attempted while in read only mode
```

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
flipper-0.15.0 docs/read-only/README.md
flipper-0.14.0 docs/read-only/README.md
flipper-0.13.0 docs/read-only/README.md
flipper-0.13.0.beta1 docs/read-only/README.md
flipper-0.12.2 docs/read-only/README.md
flipper-0.12.1 docs/read-only/README.md
flipper-0.12.0 docs/read-only/README.md
flipper-0.11.0 docs/read-only/README.md
flipper-0.11.0.rc1 docs/read-only/README.md
flipper-0.11.0.beta9 docs/read-only/README.md
flipper-0.11.0.beta8 docs/read-only/README.md
flipper-0.11.0.beta7 docs/read-only/README.md
flipper-0.11.0.beta6 docs/read-only/README.md
flipper-0.11.0.beta5 docs/read-only/README.md
flipper-0.11.0.beta4 docs/read-only/README.md
flipper-0.11.0.beta3 docs/read-only/README.md
flipper-0.11.0.beta1 docs/read-only/README.md