Class: Riddler::ContextBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/riddler/context_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ ContextBuilder

Returns a new instance of ContextBuilder.



5
6
7
# File 'lib/riddler/context_builder.rb', line 5

def initialize context
  @context = context
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



3
4
5
# File 'lib/riddler/context_builder.rb', line 3

def context
  @context
end

Instance Method Details

#data_available?Boolean

Does the current context have the data available for this builder to function

Returns:

  • (Boolean)


11
12
13
# File 'lib/riddler/context_builder.rb', line 11

def data_available?
  true
end

#extract_idsObject

Extract IDs from the context (params, headers, JWTs, etc) and store them in context.ids



17
18
19
# File 'lib/riddler/context_builder.rb', line 17

def extract_ids
  # no-op
end

#processObject

Inspect context for identifiers or data. Add any additional relevant information to the context



23
24
25
# File 'lib/riddler/context_builder.rb', line 23

def process
  # no-op
end