Sha256: 30eeee3366a095586df6b4d147f5a40ca3670bc4c7a82c185521d01ff54d822e
Contents?: true
Size: 617 Bytes
Versions: 18
Compression:
Stored size: 617 Bytes
Contents
require 'active_force/standard_types' module ActiveForce class Table def initialize klass @klass = klass.to_s end def table_name name = nil @name = name || @name || pick_table_name end def name @name ||= pick_table_name end def custom_table? !StandardTypes::STANDARD_TYPES.include?(name_without_namespace) end private def pick_table_name if custom_table? "#{ name_without_namespace }__c" else name_without_namespace end end def name_without_namespace @klass.split('::').last end end end
Version data entries
18 entries across 18 versions & 2 rubygems