Class: SBF::Client::NamePieces
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- SBF::Client::NamePieces
- Defined in:
- lib/stbaldricks/entities/lib/name.rb
Constant Summary
Constants inherited from BaseEntity
Instance Attribute Summary collapse
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#middle_initial ⇒ Object
Returns the value of attribute middle_initial.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
-
#suffix ⇒ Object
Returns the value of attribute suffix.
Attributes inherited from BaseEntity
Instance Method Summary collapse
Methods inherited from BaseEntity
#add_errors, allow_instantiation?, attr_accessor, attr_reader, attr_writer, attributes, #attributes=, collection_attributes, entity_attr_accessor, entity_attr_reader, entity_attr_writer, entity_attributes, entity_collection_attr_accessor, entity_collection_attr_reader, entity_collection_attr_writer, inherited, #initialize, #model_name, multitype_attr_accessor, multitype_attr_reader, multitype_attr_writer, multitype_collection_attr_accessor, multitype_collection_attr_reader, multitype_collection_attr_writer, #not_provided_attributes, optional_attributes, #persisted?, #to_hash, #to_json
Constructor Details
This class inherits a constructor from SBF::Client::BaseEntity
Instance Attribute Details
#first_name ⇒ Object
Returns the value of attribute first_name.
6 7 8 |
# File 'lib/stbaldricks/entities/lib/name.rb', line 6 def first_name @first_name end |
#last_name ⇒ Object
Returns the value of attribute last_name.
6 7 8 |
# File 'lib/stbaldricks/entities/lib/name.rb', line 6 def last_name @last_name end |
#middle_initial ⇒ Object
Returns the value of attribute middle_initial.
6 7 8 |
# File 'lib/stbaldricks/entities/lib/name.rb', line 6 def middle_initial @middle_initial end |
#prefix ⇒ Object
Returns the value of attribute prefix.
6 7 8 |
# File 'lib/stbaldricks/entities/lib/name.rb', line 6 def prefix @prefix end |
#suffix ⇒ Object
Returns the value of attribute suffix.
6 7 8 |
# File 'lib/stbaldricks/entities/lib/name.rb', line 6 def suffix @suffix end |
Instance Method Details
#combined_name ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/stbaldricks/entities/lib/name.rb', line 8 def combined_name name = '' name += @first_name + ' ' unless @first_name.nil? name += @middle_initial + '. ' unless @middle_initial.nil? name += @last_name unless @last_name.nil? name.strip end |