class Decidim::TermCustomizer::Context::Base

A context object resolves and stores the translation context for different application contexts. Contexts can be e.g.

The initialization method gets the data for the context which is used to resolve the translation context objects (organization, participatory space and component). These are then used to load the correct translations for each context based on the translation set constraints.

Attributes

component[R]
data[R]
organization[R]
space[R]

Public Class Methods

new(data) click to toggle source
# File lib/decidim/term_customizer/context/base.rb, line 20
def initialize(data)
  @data = data

  # Implement the resolve! method in the sub-classes
  resolve!
end