Exception: RosettAi::FeatureFlags::ExperimentalFeatureError

Inherits:
Error
  • Object
show all
Defined in:
lib/rosett_ai/feature_flags.rb

Overview

Raised when a gated command is invoked without its feature flag enabled.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(feature) ⇒ ExperimentalFeatureError

Returns a new instance of ExperimentalFeatureError.



31
32
33
34
35
36
# File 'lib/rosett_ai/feature_flags.rb', line 31

def initialize(feature)
  @feature = feature.to_s
  super(::I18n.t('rosett_ai.feature_flags.not_enabled',
                 feature: @feature,
                 env_example: "RAI_EXPERIMENTAL=#{@feature}"))
end

Instance Attribute Details

#featureString (readonly)

Returns the feature name that was not enabled.

Returns:

  • (String)

    the feature name that was not enabled



29
30
31
# File 'lib/rosett_ai/feature_flags.rb', line 29

def feature
  @feature
end