Sha256: f6b640d89b2d548660e758d776cf60580fbd19a3a615e19106ece80665eedde1
Contents?: true
Size: 636 Bytes
Versions: 4
Compression:
Stored size: 636 Bytes
Contents
require 'flipper/dsl' require 'flipper/errors' require 'flipper/feature' require 'flipper/gate' require 'flipper/registry' require 'flipper/toggle' require 'flipper/type' module Flipper def self.new(*args) DSL.new(*args) end def self.groups @groups ||= Registry.new end def self.groups=(registry) @groups = registry end def self.register(name, &block) group = Types::Group.new(name, &block) groups.add(group.name, group) group rescue Registry::DuplicateKey raise DuplicateGroup, %Q{Group named "#{name}" is already registered} end def self.group(name) groups.get(name) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
flipper-0.2.1 | lib/flipper.rb |
flipper-0.2.0 | lib/flipper.rb |
flipper-0.1.1 | lib/flipper.rb |
flipper-0.1.0 | lib/flipper.rb |