Class: Ronin::DB::PersonalConnection

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Model
Defined in:
lib/ronin/db/personal_connection.rb

Overview

Represents a connection between two Persons.

Since:

  • 0.2.0

Instance Attribute Summary collapse

Method Summary

Methods included from Model

included

Instance Attribute Details

#created_atTime

Tracks when the friendship was created.

Returns:

  • (Time)


104
# File 'lib/ronin/db/personal_connection.rb', line 104

attribute :created_at, :datetime

#friendPerson

The friend of the #person.

Returns:



97
# File 'lib/ronin/db/personal_connection.rb', line 97

belongs_to :other_person, class_name: 'Person'

#idInteger

The primary key of the friendship.

Returns:

  • (Integer)


44
# File 'lib/ronin/db/personal_connection.rb', line 44

attribute :id, :integer

#personPerson

The person who is befriending the other person.

Returns:



91
# File 'lib/ronin/db/personal_connection.rb', line 91

belongs_to :person

#typeString?

The type of the connection.

Returns:

  • (String, nil)


50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/ronin/db/personal_connection.rb', line 50

enum :type, {
  friend:   'friend',
  collegue: 'collegue',
  coworker: 'coworker',

  parent:  'parent',
  mother:  'mother',
  father:  'father',
  aunt:    'aunt',
  uncle:   'uncle',
  brother: 'brother',
  sister:  'sister',
  cousin:  'cousin',
  nephew:  'nephew',
  niece:   'niece',

  stepmother:  'stepmother',
  stepfather:  'stepfather',
  stepchild:   'stepchild',
  stepbrother: 'stepbrother',
  stepsister:  'stepsister',

  in_law:        'in-law',
  father_in_law: 'father-in-law',
  mother_in_law: 'mother-in-law',

  partner:    'partner',
  boyfriend:  'boyfriend',
  girlfriend: 'girlfriend',
  hushband:   'husband',
  wife:       'wife',

  ex:         'ex',
  ex_husband: 'ex-husband',
  ex_wife:    'ex-wife'
}, prefix: 'is_'