Skip to content

Commit

Permalink
small improvemnts in signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
rarruda committed Jan 21, 2025
1 parent fc2d512 commit dda2a02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/unleash/client.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ module Unleash

def initialize: (*untyped opts) -> void

def is_enabled?: (untyped feature, ?Context? context, ?bool default_value_param) ?{ () -> bool } -> bool
def is_enabled?: (String feature, ?Context? context, ?bool default_value_param) ?{ () -> bool } -> bool

# enabled? is a more ruby idiomatic method name than is_enabled?
alias enabled? is_enabled?

# execute a code block (passed as a parameter), if is_enabled? is true.
def if_enabled: (untyped feature, ?Context context, ?bool default_value) { (untyped) -> bool } -> (untyped | nil)
def if_enabled: (String feature, ?Context context, ?bool default_value) { (untyped) -> bool } -> (untyped | nil)

def get_variant: (untyped feature, ?Context context, ?Variant fallback_variant) -> Variant
def get_variant: (String feature, ?Context context, ?Variant fallback_variant) -> Variant

# safe shutdown: also flush metrics to server and toggles to disk
def shutdown: () -> nil
Expand Down

0 comments on commit dda2a02

Please sign in to comment.