Class: Ahnnotate::ForeignKey
- Inherits:
-
Object
- Object
- Ahnnotate::ForeignKey
- Defined in:
- lib/ahnnotate/foreign_key.rb
Instance Attribute Summary collapse
-
#from_column ⇒ Object
Returns the value of attribute from_column.
-
#name ⇒ Object
Returns the value of attribute name.
-
#to_column ⇒ Object
Returns the value of attribute to_column.
-
#to_table ⇒ Object
Returns the value of attribute to_table.
Instance Method Summary collapse
- #from ⇒ Object
-
#initialize(**args) ⇒ ForeignKey
constructor
A new instance of ForeignKey.
- #to ⇒ Object
Constructor Details
#initialize(**args) ⇒ ForeignKey
Returns a new instance of ForeignKey.
8 9 10 11 12 |
# File 'lib/ahnnotate/foreign_key.rb', line 8 def initialize(**args) args.each do |key, value| public_send("#{key}=", value) end end |
Instance Attribute Details
#from_column ⇒ Object
Returns the value of attribute from_column.
4 5 6 |
# File 'lib/ahnnotate/foreign_key.rb', line 4 def from_column @from_column end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/ahnnotate/foreign_key.rb', line 3 def name @name end |
#to_column ⇒ Object
Returns the value of attribute to_column.
6 7 8 |
# File 'lib/ahnnotate/foreign_key.rb', line 6 def to_column @to_column end |
#to_table ⇒ Object
Returns the value of attribute to_table.
5 6 7 |
# File 'lib/ahnnotate/foreign_key.rb', line 5 def to_table @to_table end |
Instance Method Details
#from ⇒ Object
14 15 16 |
# File 'lib/ahnnotate/foreign_key.rb', line 14 def from from_column end |
#to ⇒ Object
18 19 20 |
# File 'lib/ahnnotate/foreign_key.rb', line 18 def to "#{to_table}##{to_column}" end |