Class: AssocOptions
- Inherits:
-
Object
- Object
- AssocOptions
- Defined in:
- lib/scaffold/lib/model/associations/assoc_options.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#class_name ⇒ Object
Returns the value of attribute class_name.
-
#foreign_key ⇒ Object
Returns the value of attribute foreign_key.
-
#optional ⇒ Object
Returns the value of attribute optional.
-
#primary_key ⇒ Object
Returns the value of attribute primary_key.
Instance Method Summary collapse
Instance Attribute Details
#class_name ⇒ Object
Returns the value of attribute class_name.
2 3 4 |
# File 'lib/scaffold/lib/model/associations/assoc_options.rb', line 2 def class_name @class_name end |
#foreign_key ⇒ Object
Returns the value of attribute foreign_key.
2 3 4 |
# File 'lib/scaffold/lib/model/associations/assoc_options.rb', line 2 def foreign_key @foreign_key end |
#optional ⇒ Object
Returns the value of attribute optional.
2 3 4 |
# File 'lib/scaffold/lib/model/associations/assoc_options.rb', line 2 def optional @optional end |
#primary_key ⇒ Object
Returns the value of attribute primary_key.
2 3 4 |
# File 'lib/scaffold/lib/model/associations/assoc_options.rb', line 2 def primary_key @primary_key end |
Instance Method Details
#model_class ⇒ Object
9 10 11 |
# File 'lib/scaffold/lib/model/associations/assoc_options.rb', line 9 def model_class class_name.to_s.constantize end |
#table_name ⇒ Object
13 14 15 |
# File 'lib/scaffold/lib/model/associations/assoc_options.rb', line 13 def table_name model_class.table_name end |