Class: DbSchema::Definitions::Table
- Inherits:
-
Object
- Object
- DbSchema::Definitions::Table
- Defined in:
- lib/db_schema/definitions.rb
Instance Attribute Summary collapse
-
#checks ⇒ Object
readonly
Returns the value of attribute checks.
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#foreign_keys ⇒ Object
readonly
Returns the value of attribute foreign_keys.
-
#indices ⇒ Object
readonly
Returns the value of attribute indices.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, fields: [], indices: [], checks: [], foreign_keys: []) ⇒ Table
constructor
A new instance of Table.
Constructor Details
#initialize(name, fields: [], indices: [], checks: [], foreign_keys: []) ⇒ Table
Returns a new instance of Table.
101 102 103 104 105 106 107 |
# File 'lib/db_schema/definitions.rb', line 101 def initialize(name, fields: [], indices: [], checks: [], foreign_keys: []) @name = name.to_sym @fields = fields @indices = indices @checks = checks @foreign_keys = foreign_keys end |
Instance Attribute Details
#checks ⇒ Object (readonly)
Returns the value of attribute checks.
99 100 101 |
# File 'lib/db_schema/definitions.rb', line 99 def checks @checks end |
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
99 100 101 |
# File 'lib/db_schema/definitions.rb', line 99 def fields @fields end |
#foreign_keys ⇒ Object (readonly)
Returns the value of attribute foreign_keys.
99 100 101 |
# File 'lib/db_schema/definitions.rb', line 99 def foreign_keys @foreign_keys end |
#indices ⇒ Object (readonly)
Returns the value of attribute indices.
99 100 101 |
# File 'lib/db_schema/definitions.rb', line 99 def indices @indices end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
99 100 101 |
# File 'lib/db_schema/definitions.rb', line 99 def name @name end |