Class: Pinspec::ForeignKey

Inherits:
Data
  • Object
show all
Defined in:
lib/pinspec/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



402
403
404
# File 'lib/pinspec/types.rb', line 402

def column
  @column
end

#from_tableObject (readonly)

Returns the value of attribute from_table

Returns:

  • (Object)

    the current value of from_table



402
403
404
# File 'lib/pinspec/types.rb', line 402

def from_table
  @from_table
end

#on_deleteObject (readonly)

Returns the value of attribute on_delete

Returns:

  • (Object)

    the current value of on_delete



402
403
404
# File 'lib/pinspec/types.rb', line 402

def on_delete
  @on_delete
end

#primary_keyObject (readonly)

Returns the value of attribute primary_key

Returns:

  • (Object)

    the current value of primary_key



402
403
404
# File 'lib/pinspec/types.rb', line 402

def primary_key
  @primary_key
end

#sourceObject (readonly)

Returns the value of attribute source

Returns:

  • (Object)

    the current value of source



402
403
404
# File 'lib/pinspec/types.rb', line 402

def source
  @source
end

#to_tableObject (readonly)

Returns the value of attribute to_table

Returns:

  • (Object)

    the current value of to_table



402
403
404
# File 'lib/pinspec/types.rb', line 402

def to_table
  @to_table
end

Instance Method Details

#heuristic?Boolean

Returns:

  • (Boolean)


403
404
405
# File 'lib/pinspec/types.rb', line 403

def heuristic?
  source == :heuristic
end

#keyObject



407
408
409
# File 'lib/pinspec/types.rb', line 407

def key
  "#{from_table}.#{column}"
end