Sha256: eb22f96ba148e3504f5ddf96d41a513b74eed47c230223da6bace9574fcb2501

Contents?: true

Size: 845 Bytes

Versions: 19

Compression:

Stored size: 845 Bytes

Contents

module RhoconnectAdapters
  module CRM
    class << self 
      attr_reader :registered_backends
      attr_reader :standard_sources

      def valid_backend?(name)
        registered_backends.index(name) != nil
      end
      def standard_source?(name)
        standard_sources.index(name) != nil
      end
    end
    @registered_backends = ['MsDynamics','OracleOnDemand','Salesforce','Sugar'];
    @standard_sources = ['Account','Contact','Opportunity','Lead'];
  
    class Field
      class << self
        def create(name,type,label=nil)
          { name => { :type => type,
                      :label => label.nil? ? name : label }}
        end
      
        def load_file(filename,key=nil)
          contents = YAML.load_file(filename)
          return key.nil? ? contents : contents[key]
        end
      end
    end    
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rhoconnect-adapters-1.1.8 lib/rhoconnect-adapters/crm/crm.rb
rhoconnect-adapters-1.1.7 lib/rhoconnect-adapters/crm/crm.rb
rhoconnect-adapters-1.1.6 lib/rhoconnect-adapters/crm/crm.rb
rhoconnect-adapters-1.1.5 lib/rhoconnect-adapters/crm/crm.rb
rhoconnect-adapters-1.1.1 lib/rhoconnect-adapters/crm/crm.rb
rhoconnect-adapters-1.1 lib/rhoconnect-adapters/crm/crm.rb
rhoconnect-adapters-1.0.6 lib/rhoconnect-adapters/crm/crm.rb
rhoconnect-adapters-1.0.5 lib/rhoconnect-adapters/crm/crm.rb
rhoconnect-adapters-1.0.3 lib/rhoconnect-adapters/crm/crm.rb
rhoconnect-adapters-1.0.4 lib/rhoconnect-adapters/crm/crm.rb
rhoconnect-adapters-1.0.3.beta3 lib/rhoconnect-adapters/crm/crm.rb
rhoconnect-adapters-1.0.3.beta2 lib/rhoconnect-adapters/crm/crm.rb
rhoconnect-adapters-1.0.3.beta1 lib/rhoconnect-adapters/crm/crm.rb
rhoconnect-adapters-1.0.2 lib/rhoconnect-adapters/crm/crm.rb
rhoconnect-adapters-1.0.1 lib/rhoconnect-adapters/crm/crm.rb
rhoconnect-adapters-1.0.0 lib/rhoconnect-adapters/crm/crm.rb
rhoconnect-adapters-1.0.0.beta3 lib/rhoconnect-adapters/crm/crm.rb
rhoconnect-adapters-1.0.0.beta2 lib/rhoconnect-adapters/crm/crm.rb
rhoconnect-adapters-1.0.0.beta1 lib/rhoconnect-adapters/crm/crm.rb