Sha256: e0c2610ff6147244d75d6e20ee1fba38542ba17022e6f04a868d503e8e3cc8df
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
# encoding: UTF-8 module Rosette module Core # 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+. # # @example # IntegrationId.resolve('smartling') # # => Rosette::Integrations::SmartlingIntegration class IntegrationId < Resolver class << self # Parses and identifies the class constant for the given integration id. # # @param [Class, String] integration_id When given a class, returns the # class. When given a string, parses and identifies the corresponding # class constant in +namespace+. # @param [Class] namespace The namespace to look in. # @return [Class] The identified class constant. def resolve(integration_id, namespace = Rosette::Integrations) super end private def suffix 'Integration' end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rosette-core-1.0.1 | lib/rosette/core/resolvers/integration_id.rb |