Skip to content

Commit

Permalink
chore: add steepfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mschoenlaub committed Sep 8, 2023
1 parent ffc59f8 commit 420334f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
10 changes: 10 additions & 0 deletions Steepfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true

target :lib do
signature "sig"
check "lib"
library "pathname"
library "forwardable"
library "singleton"
library "uri"
end
16 changes: 7 additions & 9 deletions sig/openfeature/sdk/provider/no_op_provider.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ module OpenFeature
class NoOpProvider
REASON_NO_OP: String
NAME: String

class ResolutionDetails[T] < ::Struct[T]
def initialize : (value: T, reason: String) -> void

attr_reader value(): T
attr_reader reason(): untyped
attr_reader variant(): untyped
Expand All @@ -15,17 +16,14 @@ module OpenFeature

attr_reader metadata: Metadata

def fetch_boolean_value: (flag_key: String, default_value: bool?, ?evaluation_context: evaluationContext?) -> ResolutionDetails[bool]

def fetch_string_value: (flag_key: String, default_value: String?, ?evaluation_context: evaluationContext?) -> ResolutionDetails[String]

def fetch_number_value: (flag_key: String, default_value: Numeric?, ?evaluation_context: evaluationContext?) -> ResolutionDetails[Numeric]
def fetch_boolean_value: (flag_key: String, default_value: bool, ?evaluation_context: evaluationContext?) -> ResolutionDetails[bool]

def fetch_object_value: (flag_key: String, default_value: Hash[untyped, untyped]?, ?evaluation_context: evaluationContext?) -> ResolutionDetails[Hash[untyped, untyped]]
def fetch_string_value: (flag_key: String, default_value: String, ?evaluation_context: evaluationContext?) -> ResolutionDetails[String]

private
def fetch_number_value: (flag_key: String, default_value: Numeric, ?evaluation_context: evaluationContext?) -> ResolutionDetails[Numeric]

def no_op:(default_value: flagValue) -> ResolutionDetails[flagValue]
def fetch_object_value: (flag_key: String, default_value: Hash[String|Symbol, untyped], ?evaluation_context: evaluationContext?) -> ResolutionDetails[Hash[String|Symbol, untyped]]
def no_op: [X] (X) -> ResolutionDetails[X]
end
end
end
Expand Down

0 comments on commit 420334f

Please sign in to comment.