Class: ForeignKeyChecker::Utils::BelongsTo::WayPoint
- Inherits:
-
Object
- Object
- ForeignKeyChecker::Utils::BelongsTo::WayPoint
- Defined in:
- lib/foreign_key_checker/utils/belongs_to.rb
Instance Attribute Summary collapse
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
- #==(value) ⇒ Object
-
#initialize(foreign_key, table) ⇒ WayPoint
constructor
A new instance of WayPoint.
- #inspect ⇒ Object
Constructor Details
#initialize(foreign_key, table) ⇒ WayPoint
Returns a new instance of WayPoint.
493 494 495 496 |
# File 'lib/foreign_key_checker/utils/belongs_to.rb', line 493 def initialize(foreign_key, table) @foreign_key = foreign_key @table = table end |
Instance Attribute Details
#table ⇒ Object (readonly)
Returns the value of attribute table.
492 493 494 |
# File 'lib/foreign_key_checker/utils/belongs_to.rb', line 492 def table @table end |
Instance Method Details
#==(value) ⇒ Object
504 505 506 507 508 |
# File 'lib/foreign_key_checker/utils/belongs_to.rb', line 504 def ==(value) return @table == value if value.is_a?(String) value.table == @table end |
#inspect ⇒ Object
498 499 500 501 502 |
# File 'lib/foreign_key_checker/utils/belongs_to.rb', line 498 def inspect return @table if @foreign_key.blank? "->#{@foreign_key}(#{@table})" end |