Class: DBD4::ForeignKeyField
- Inherits:
-
Object
- Object
- DBD4::ForeignKeyField
- Defined in:
- lib/dbd4/dbd4_model_file.rb
Instance Attribute Summary collapse
-
#destination_field ⇒ Object
readonly
Returns the value of attribute destination_field.
-
#source_field ⇒ Object
readonly
Returns the value of attribute source_field.
Instance Method Summary collapse
-
#initialize(fkfield_string) ⇒ ForeignKeyField
constructor
A new instance of ForeignKeyField.
- #to_str ⇒ Object
Constructor Details
#initialize(fkfield_string) ⇒ ForeignKeyField
Returns a new instance of ForeignKeyField.
247 248 249 |
# File 'lib/dbd4/dbd4_model_file.rb', line 247 def initialize(fkfield_string) @source_field, @destination_field = fkfield_string.split(/=/) end |
Instance Attribute Details
#destination_field ⇒ Object (readonly)
Returns the value of attribute destination_field.
245 246 247 |
# File 'lib/dbd4/dbd4_model_file.rb', line 245 def destination_field @destination_field end |
#source_field ⇒ Object (readonly)
Returns the value of attribute source_field.
245 246 247 |
# File 'lib/dbd4/dbd4_model_file.rb', line 245 def source_field @source_field end |
Instance Method Details
#to_str ⇒ Object
251 252 253 |
# File 'lib/dbd4/dbd4_model_file.rb', line 251 def to_str "#{source_field} => #{destination_field}" end |