Class: ForeignKeyChecker::Checkers::Relations::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/foreign_key_checker/checkers/relations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Result

Returns a new instance of Result.



6
7
8
9
10
# File 'lib/foreign_key_checker/checkers/relations.rb', line 6

def initialize(**args)
  %i[model association ok error fk table].each do |key|
    instance_variable_set("@#{key}", args[key])
  end
end

Instance Attribute Details

#associationObject (readonly)

Returns the value of attribute association.



5
6
7
# File 'lib/foreign_key_checker/checkers/relations.rb', line 5

def association
  @association
end

#errorObject (readonly)

Returns the value of attribute error.



5
6
7
# File 'lib/foreign_key_checker/checkers/relations.rb', line 5

def error
  @error
end

#fkObject (readonly)

Returns the value of attribute fk.



5
6
7
# File 'lib/foreign_key_checker/checkers/relations.rb', line 5

def fk
  @fk
end

#modelObject (readonly)

Returns the value of attribute model.



5
6
7
# File 'lib/foreign_key_checker/checkers/relations.rb', line 5

def model
  @model
end

#okObject (readonly)

Returns the value of attribute ok.



5
6
7
# File 'lib/foreign_key_checker/checkers/relations.rb', line 5

def ok
  @ok
end

#tableObject (readonly)

Returns the value of attribute table.



5
6
7
# File 'lib/foreign_key_checker/checkers/relations.rb', line 5

def table
  @table
end