Class: Vorpal::Config::ForeignKeyInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/vorpal/config/foreign_key_info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fk_column, fk_type_column, fk_type, polymorphic) ⇒ ForeignKeyInfo

Returns a new instance of ForeignKeyInfo.



11
12
13
14
15
16
# File 'lib/vorpal/config/foreign_key_info.rb', line 11

def initialize(fk_column, fk_type_column, fk_type, polymorphic)
  @fk_column = fk_column
  @fk_type_column = fk_type_column
  @fk_type = fk_type
  @polymorphic = polymorphic
end

Instance Attribute Details

#fk_columnObject (readonly)

Returns the value of attribute fk_column.



9
10
11
# File 'lib/vorpal/config/foreign_key_info.rb', line 9

def fk_column
  @fk_column
end

#fk_typeObject (readonly)

Returns the value of attribute fk_type.



9
10
11
# File 'lib/vorpal/config/foreign_key_info.rb', line 9

def fk_type
  @fk_type
end

#fk_type_columnObject (readonly)

Returns the value of attribute fk_type_column.



9
10
11
# File 'lib/vorpal/config/foreign_key_info.rb', line 9

def fk_type_column
  @fk_type_column
end

#polymorphicObject (readonly)

Returns the value of attribute polymorphic.



9
10
11
# File 'lib/vorpal/config/foreign_key_info.rb', line 9

def polymorphic
  @polymorphic
end

Instance Method Details

#polymorphic?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/vorpal/config/foreign_key_info.rb', line 18

def polymorphic?
  @polymorphic
end