Class: FruitToLime::Coworker
- Inherits:
-
Object
- Object
- FruitToLime::Coworker
- Includes:
- SerializeHelper
- Defined in:
- lib/fruit_to_lime/model/coworker.rb
Instance Attribute Summary collapse
-
#direct_phone_number ⇒ Object
Returns the value of attribute direct_phone_number.
-
#email ⇒ Object
Returns the value of attribute email.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#home_phone_number ⇒ Object
Returns the value of attribute home_phone_number.
-
#id ⇒ Object
Returns the value of attribute id.
-
#integration_id ⇒ Object
Returns the value of attribute integration_id.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#mobile_phone_number ⇒ Object
Returns the value of attribute mobile_phone_number.
Instance Method Summary collapse
- #==(that) ⇒ Object
-
#initialize ⇒ Coworker
constructor
A new instance of Coworker.
- #serialize_name ⇒ Object
- #serialize_variables ⇒ Object
- #to_reference ⇒ Object
Methods included from SerializeHelper
#get_import_rows, get_import_rows, #map_symbol_to_row, #map_to_row, serialize, #serialize, #serialize_to_file, serialize_to_file, serialize_variables, #symbol_to_name
Constructor Details
#initialize ⇒ Coworker
Returns a new instance of Coworker.
7 8 |
# File 'lib/fruit_to_lime/model/coworker.rb', line 7 def initialize() end |
Instance Attribute Details
#direct_phone_number ⇒ Object
Returns the value of attribute direct_phone_number.
4 5 6 |
# File 'lib/fruit_to_lime/model/coworker.rb', line 4 def direct_phone_number @direct_phone_number end |
#email ⇒ Object
Returns the value of attribute email.
4 5 6 |
# File 'lib/fruit_to_lime/model/coworker.rb', line 4 def email @email end |
#first_name ⇒ Object
Returns the value of attribute first_name.
4 5 6 |
# File 'lib/fruit_to_lime/model/coworker.rb', line 4 def first_name @first_name end |
#home_phone_number ⇒ Object
Returns the value of attribute home_phone_number.
4 5 6 |
# File 'lib/fruit_to_lime/model/coworker.rb', line 4 def home_phone_number @home_phone_number end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/fruit_to_lime/model/coworker.rb', line 4 def id @id end |
#integration_id ⇒ Object
Returns the value of attribute integration_id.
4 5 6 |
# File 'lib/fruit_to_lime/model/coworker.rb', line 4 def integration_id @integration_id end |
#last_name ⇒ Object
Returns the value of attribute last_name.
4 5 6 |
# File 'lib/fruit_to_lime/model/coworker.rb', line 4 def last_name @last_name end |
#mobile_phone_number ⇒ Object
Returns the value of attribute mobile_phone_number.
4 5 6 |
# File 'lib/fruit_to_lime/model/coworker.rb', line 4 def mobile_phone_number @mobile_phone_number end |
Instance Method Details
#==(that) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/fruit_to_lime/model/coworker.rb', line 30 def ==(that) if that.nil? return false end if that.is_a? Coworker return @integration_id == that.integration_id elsif that.is_a? String return @integration_id == that end return false end |
#serialize_name ⇒ Object
26 27 28 |
# File 'lib/fruit_to_lime/model/coworker.rb', line 26 def serialize_name "Coworker" end |
#serialize_variables ⇒ Object
10 11 12 13 14 15 |
# File 'lib/fruit_to_lime/model/coworker.rb', line 10 def serialize_variables [ :id, :integration_id, :first_name, :last_name, :email, :direct_phone_number, :mobile_phone_number, :home_phone_number ].map {|p| { :id => p, :type => :string } } end |
#to_reference ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/fruit_to_lime/model/coworker.rb', line 17 def to_reference reference = CoworkerReference.new reference.id = @id reference.integration_id = @integration_id reference.heading = "#{@first_name} #{@last_name}".strip return reference end |