Sha256: 8c78beb30505ca0545bf1790074ea5ff9769748798c173aa535537a04bd05a65

Contents?: true

Size: 473 Bytes

Versions: 33

Compression:

Stored size: 473 Bytes

Contents

# frozen_string_literal: true

require_relative 'common_enum_methods'
# Module all SoqlEnums include
module SoqlEnum
  # @param [Class] object Object inheriting from SoqlData that has picklists underneath it
  # @return [Array] List of picklist classes that inherit from SoqlEnum and relate to provided class
  def self.values_for(object)
    ObjectSpace.each_object(Module).select { |class_name| class_name < self && class_name.to_s.start_with?("#{object}::") }
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
leap_salesforce-1.5.0 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.4.4 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.4.3 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.4.2 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.4.1 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.4.0 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.3.1 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.3.0 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.2.2 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.2.1 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.2.0 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.1.2 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.1.1 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.1.0 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.0.5 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.0.4 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.0.3 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.0.2 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.0.1 lib/leap_salesforce/soql_data/soql_enum.rb
leap_salesforce-1.0.0 lib/leap_salesforce/soql_data/soql_enum.rb