class RareMap::Model
RareMap::Model
defines the details of an ActiveRecord model. @author Wei-Ming Wu @!attribute [r] db_name
@return [String] the name of the database
@!attribute [r] connection
@return [Hash] the connection config of this Model
@!attribute [r] table
@return [Table] the Table of this Model
@!attribute [r] group
@return [String] the group of this Model
@!attribute relations
@return [Array] an Array of Relation of this Model
Attributes
connection[R]
db_name[R]
group[R]
relations[RW]
table[R]
Public Class Methods
new(db_name, connection, table, group = 'default')
click to toggle source
Creates a Model
.
@param db_name
[String] the name of database @param connection [Hash] the connection config of ActiveRecord @param table [Table] the database table @param group [String] the group name of this Model
@return [Model] a Model
object
# File lib/rare_map/model.rb, line 29 def initialize(db_name, connection, table, group = 'default') @db_name, @connection, @table, @group = db_name, connection, table, group @relations = [] end
Public Instance Methods
classify()
click to toggle source