Class: ActiveForce::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/active_force/table.rb

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ Table

Returns a new instance of Table.



6
7
8
# File 'lib/active_force/table.rb', line 6

def initialize klass
  @klass = klass.to_s
end

Instance Method Details

#custom_table?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/active_force/table.rb', line 18

def custom_table?
  !StandardTypes::STANDARD_TYPES.include?(name_without_namespace)
end

#nameObject



14
15
16
# File 'lib/active_force/table.rb', line 14

def name
  @name ||= pick_table_name
end

#table_name(name = nil) ⇒ Object



10
11
12
# File 'lib/active_force/table.rb', line 10

def table_name name = nil
  @name = name || @name || pick_table_name
end