class Flipflop::FeatureDefinition
Attributes
default[R]
description[R]
group[R]
key[R]
location[R]
name[R]
title[R]
Public Class Methods
new(key, **options)
click to toggle source
# File lib/flipflop/feature_definition.rb, line 5 def initialize(key, **options) @key = key @name = @key.to_s.freeze @title = options.delete(:title).freeze || @name.humanize.freeze @description = options.delete(:description).freeze @default = !!options.delete(:default) || false @group = options.delete(:group).freeze @location = caller_locations(3, 1).first.freeze if options.any? raise FeatureError.new(name, "has unknown option #{options.keys.map(&:inspect) * ', '}") end end