Class: ActiveFlags::Handler::FlagMapper
- Inherits:
-
Object
- Object
- ActiveFlags::Handler::FlagMapper
- Defined in:
- lib/active_flags/handler/flag_mapper.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(authorized_flags = {}, flags) ⇒ FlagMapper
constructor
A new instance of FlagMapper.
- #remap ⇒ Object
Constructor Details
#initialize(authorized_flags = {}, flags) ⇒ FlagMapper
Returns a new instance of FlagMapper.
7 8 9 10 |
# File 'lib/active_flags/handler/flag_mapper.rb', line 7 def initialize( = {}, flags) @authorized_flags = @flags = flags end |
Class Method Details
.remap(authorized_flags, flags) ⇒ Object
17 18 19 |
# File 'lib/active_flags/handler/flag_mapper.rb', line 17 def self.remap(, flags) new(, flags).remap end |
Instance Method Details
#remap ⇒ Object
12 13 14 15 |
# File 'lib/active_flags/handler/flag_mapper.rb', line 12 def remap @flags = FlagMappers::Authorizer.(@authorized_flags, @flags) FlagMappers::KeyValueMapper.remap(@flags) end |