Class: CleoDesignTokens::Colors

Inherits:
Data
  • Object
show all
Defined in:
lib/cleo_design_tokens.rb

Overview

Namespaced by token type (colors), then by layer (primitives, semantic) — lowercase accessors, not CleoDesignTokens::Colors:: Semantic.fetch(...) module nesting, so the call text stays identical to the TypeScript reader (a colour greps across both repos).

Data, not a plain Hash: colors.primitives needs to be an attribute read (matching the reader's own dot-accessor contract), and a Hash has no .primitives method. Plural Colors, not Color — an instance holds both buckets for the colors token type, not a single colour.

Instance Attribute Summary collapse

Instance Attribute Details

#primitivesObject (readonly)

Returns the value of attribute primitives

Returns:

  • (Object)

    the current value of primitives



39
40
41
# File 'lib/cleo_design_tokens.rb', line 39

def primitives
  @primitives
end

#semanticObject (readonly)

Returns the value of attribute semantic

Returns:

  • (Object)

    the current value of semantic



39
40
41
# File 'lib/cleo_design_tokens.rb', line 39

def semantic
  @semantic
end