Class: Rosette::Core::IntegrationId

Inherits:
Resolver
  • Object
show all
Defined in:
lib/rosette/core/resolvers/integration_id.rb

Overview

Logic for handling integration ids. Integration ids are strings that refer to a particular integration class. For example, the id 'smartling' refers to Rosette::Integrations::SmartlingIntegration.

Examples:

IntegrationId.resolve('smartling')# => Rosette::Integrations::SmartlingIntegration

Class Method Summary collapse

Methods inherited from Resolver

parse_id

Class Method Details

.resolve(integration_id, namespace = Rosette::Integrations) ⇒ Class

Parses and identifies the class constant for the given integration id.

Parameters:

  • integration_id (Class, String)

    When given a class, returns the class. When given a string, parses and identifies the corresponding class constant in namespace.

  • namespace (Class) (defaults to: Rosette::Integrations)

    The namespace to look in.

Returns:

  • (Class)

    The identified class constant.


23
24
25
# File 'lib/rosette/core/resolvers/integration_id.rb', line 23

def resolve(integration_id, namespace = Rosette::Integrations)
  super
end