Class: ActsAsTable::Configuration

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/acts_as_table.rb

Overview

ActsAsTable configuration object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeActsAsTable::Configuration

Returns a new ActsAsTable configuration object.



203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/acts_as_table.rb', line 203

def initialize
  @adapter = ActsAsTable::Adapter.new

  @formats = []

  @belongs_tos_table = :belongs_tos
  @column_models_table = :column_models
  @foreign_key_maps_table = :foreign_key_maps
  @foreign_keys_table = :foreign_keys
  @has_manies_table = :has_manies
  @has_many_targets_table = :has_many_targets
  @lenses_table = :lenses
  @primary_keys_table = :primary_keys
  @record_errors_table = :record_errors
  @record_models_table = :record_models
  @records_table = :records
  @row_models_table = :row_models
  @tables_table = :tables
  @values_table = :values
end

Instance Attribute Details

#adapterActsAsTable::Adapter

Returns the ActsAsTable adapter object (default: ActsAsTable::Adapter.new).



132
133
134
# File 'lib/acts_as_table.rb', line 132

def adapter
  @adapter
end

#belongs_tos_tableSymbol

Returns the table name for the BelongsTo class (default: :belongs_tos).

Returns:

  • (Symbol)


196
197
198
# File 'lib/acts_as_table.rb', line 196

%w(BelongsTo ColumnModel ForeignKey ForeignKeyMap HasMany HasManyTarget Lense PrimaryKey Record RecordError RecordModel RowModel Table Value).each do |class_name|
  attr_accessor :"#{class_name.pluralize.underscore}_table"
end

#column_models_tableSymbol

Returns the table name for the ActsAsTable::ColumnModel class (default: :column_models).

Returns:

  • (Symbol)


196
197
198
# File 'lib/acts_as_table.rb', line 196

%w(BelongsTo ColumnModel ForeignKey ForeignKeyMap HasMany HasManyTarget Lense PrimaryKey Record RecordError RecordModel RowModel Table Value).each do |class_name|
  attr_accessor :"#{class_name.pluralize.underscore}_table"
end

#foreign_key_maps_tableSymbol

Returns the table name for the ForeignKeyMap class (default: :foreign_key_maps).

Returns:

  • (Symbol)


196
197
198
# File 'lib/acts_as_table.rb', line 196

%w(BelongsTo ColumnModel ForeignKey ForeignKeyMap HasMany HasManyTarget Lense PrimaryKey Record RecordError RecordModel RowModel Table Value).each do |class_name|
  attr_accessor :"#{class_name.pluralize.underscore}_table"
end

#foreign_keys_tableSymbol

Returns the table name for the ForeignKey class (default: :foreign_key).

Returns:

  • (Symbol)


196
197
198
# File 'lib/acts_as_table.rb', line 196

%w(BelongsTo ColumnModel ForeignKey ForeignKeyMap HasMany HasManyTarget Lense PrimaryKey Record RecordError RecordModel RowModel Table Value).each do |class_name|
  attr_accessor :"#{class_name.pluralize.underscore}_table"
end

#formatsArray<Symbol>

Returns the non-inherited constant names for available ActsAsTable serialization format modules (default: []).

Returns:

  • (Array<Symbol>)


138
139
140
# File 'lib/acts_as_table.rb', line 138

def formats
  @formats
end

#has_manies_tableSymbol

Returns the table name for the HasMany class (default: :has_manies).

Returns:

  • (Symbol)


196
197
198
# File 'lib/acts_as_table.rb', line 196

%w(BelongsTo ColumnModel ForeignKey ForeignKeyMap HasMany HasManyTarget Lense PrimaryKey Record RecordError RecordModel RowModel Table Value).each do |class_name|
  attr_accessor :"#{class_name.pluralize.underscore}_table"
end

#has_many_targets_tableSymbol

Returns the table name for the HasManyTarget class (default: :has_many_targets).

Returns:

  • (Symbol)


196
197
198
# File 'lib/acts_as_table.rb', line 196

%w(BelongsTo ColumnModel ForeignKey ForeignKeyMap HasMany HasManyTarget Lense PrimaryKey Record RecordError RecordModel RowModel Table Value).each do |class_name|
  attr_accessor :"#{class_name.pluralize.underscore}_table"
end

#lenses_tableSymbol

Returns the table name for the Lense class (default: :lenses).

Returns:

  • (Symbol)


196
197
198
# File 'lib/acts_as_table.rb', line 196

%w(BelongsTo ColumnModel ForeignKey ForeignKeyMap HasMany HasManyTarget Lense PrimaryKey Record RecordError RecordModel RowModel Table Value).each do |class_name|
  attr_accessor :"#{class_name.pluralize.underscore}_table"
end

#primary_keys_tableSymbol

Returns the table name for the PrimaryKey class (default: :primary_keys).

Returns:

  • (Symbol)


196
197
198
# File 'lib/acts_as_table.rb', line 196

%w(BelongsTo ColumnModel ForeignKey ForeignKeyMap HasMany HasManyTarget Lense PrimaryKey Record RecordError RecordModel RowModel Table Value).each do |class_name|
  attr_accessor :"#{class_name.pluralize.underscore}_table"
end

#record_errors_tableSymbol

Returns the table name for the RecordError class (default: :record_errors).

Returns:

  • (Symbol)


196
197
198
# File 'lib/acts_as_table.rb', line 196

%w(BelongsTo ColumnModel ForeignKey ForeignKeyMap HasMany HasManyTarget Lense PrimaryKey Record RecordError RecordModel RowModel Table Value).each do |class_name|
  attr_accessor :"#{class_name.pluralize.underscore}_table"
end

#record_models_tableSymbol

Returns the table name for the RecordModel class (default: :record_models).

Returns:

  • (Symbol)


196
197
198
# File 'lib/acts_as_table.rb', line 196

%w(BelongsTo ColumnModel ForeignKey ForeignKeyMap HasMany HasManyTarget Lense PrimaryKey Record RecordError RecordModel RowModel Table Value).each do |class_name|
  attr_accessor :"#{class_name.pluralize.underscore}_table"
end

#records_tableSymbol

Returns the table name for the Record class (default: :records).

Returns:

  • (Symbol)


196
197
198
# File 'lib/acts_as_table.rb', line 196

%w(BelongsTo ColumnModel ForeignKey ForeignKeyMap HasMany HasManyTarget Lense PrimaryKey Record RecordError RecordModel RowModel Table Value).each do |class_name|
  attr_accessor :"#{class_name.pluralize.underscore}_table"
end

#row_models_tableSymbol

Returns the table name for the RowModel class (default: :row_model).

Returns:

  • (Symbol)


196
197
198
# File 'lib/acts_as_table.rb', line 196

%w(BelongsTo ColumnModel ForeignKey ForeignKeyMap HasMany HasManyTarget Lense PrimaryKey Record RecordError RecordModel RowModel Table Value).each do |class_name|
  attr_accessor :"#{class_name.pluralize.underscore}_table"
end

#tables_tableSymbol

Returns the table name for the Table class (default: :table).

Returns:

  • (Symbol)


196
197
198
# File 'lib/acts_as_table.rb', line 196

%w(BelongsTo ColumnModel ForeignKey ForeignKeyMap HasMany HasManyTarget Lense PrimaryKey Record RecordError RecordModel RowModel Table Value).each do |class_name|
  attr_accessor :"#{class_name.pluralize.underscore}_table"
end

#values_tableSymbol

Returns the table name for the Value class (default: :value).

Returns:

  • (Symbol)


196
197
198
# File 'lib/acts_as_table.rb', line 196

%w(BelongsTo ColumnModel ForeignKey ForeignKeyMap HasMany HasManyTarget Lense PrimaryKey Record RecordError RecordModel RowModel Table Value).each do |class_name|
  attr_accessor :"#{class_name.pluralize.underscore}_table"
end