{"id":22808252,"url":"https://github.com/sixarm/sixarm_ruby_person_name","last_synced_at":"2026-05-02T19:37:18.964Z","repository":{"id":921396,"uuid":"685756","full_name":"SixArm/sixarm_ruby_person_name","owner":"SixArm","description":"SixArm.com » Ruby » PersonName provides methods for names, initials, etc.","archived":false,"fork":false,"pushed_at":"2023-09-15T19:28:48.000Z","size":466,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-06T00:24:25.149Z","etag":null,"topics":["gem","name","person","ruby"],"latest_commit_sha":null,"homepage":"http://sixarm.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SixArm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null}},"created_at":"2010-05-25T18:26:19.000Z","updated_at":"2023-05-22T14:12:28.000Z","dependencies_parsed_at":"2023-07-05T15:16:49.833Z","dependency_job_id":null,"html_url":"https://github.com/SixArm/sixarm_ruby_person_name","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fsixarm_ruby_person_name","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fsixarm_ruby_person_name/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fsixarm_ruby_person_name/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fsixarm_ruby_person_name/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SixArm","download_url":"https://codeload.github.com/SixArm/sixarm_ruby_person_name/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246379366,"owners_count":20767696,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gem","name","person","ruby"],"created_at":"2024-12-12T11:08:51.307Z","updated_at":"2026-05-02T19:37:18.932Z","avatar_url":"https://github.com/SixArm.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SixArm.com → Ruby → \u003cbr\u003e PersonName mixin methods for a person model\n\n\u003c!--header-open--\u003e\n\n[![Gem Version](https://badge.fury.io/rb/sixarm_ruby_person_name.svg)](http://badge.fury.io/rb/sixarm_ruby_person_name)\n[![Build Status](https://travis-ci.org/SixArm/sixarm_ruby_person_name.png)](https://travis-ci.org/SixArm/sixarm_ruby_person_name)\n[![Code Climate](https://api.codeclimate.com/v1/badges/a895fd425b0fec86bfb1/maintainability)](https://codeclimate.com/github/SixArm/sixarm_ruby_person_name/maintainability)\n\n* Git: \u003chttps://github.com/SixArm/sixarm_ruby_person_name\u003e\n* Doc: \u003chttp://sixarm.com/sixarm_ruby_person_name/doc\u003e\n* Gem: \u003chttps://rubygems.org/gems/sixarm_ruby_person_name\u003e\n* Contact: Joel Parker Henderson, \u003cjoel@sixarm.com\u003e\n* Project: [changes](CHANGES.md), [license](LICENSE.md), [contributing](CONTRIBUTING.md).\n\n\u003c!--header-shut--\u003e\n\n\n## Introduction\n\nOur user models typically have accessors like these:\n\n   user.given_name =\u003e \"Martin\"\n   user.middle_name =\u003e \"Luther\"\n   user.family_name =\u003e \"King\"\n\nThis gem is a utility to concatenate the user's name various common ways:\n\n   user.full_name =\u003e \"Martin Luther King\"\n   user.list_name =\u003e \"King, Martin Luther\"\n   user.initials =\u003e \"MLK\"\n\nIt's fine if the model doesn't have a middle_name field, or if any of the values of any of the fields are nil or blank; this gem will do the right thing.\n\nFor docs go to \u003chttp://sixarm.com/sixarm_ruby_person_name/doc\u003e\n\nWant to help? We're happy to get pull requests.\n\n\n\u003c!--install-open--\u003e\n\n## Install\n\n### Gem\n\nTo install this gem in your shell or terminal:\n\n    gem install sixarm_ruby_person_name\n\n### Gemfile\n\nTo add this gem to your Gemfile:\n\n    gem 'sixarm_ruby_person_name'\n\n### Require\n\nTo require the gem in your code:\n\n    require 'sixarm_ruby_person_name'\n\n\u003c!--install-shut--\u003e\n\n\n## Example\n\nCreate a typical user class, include this mixin, the use it:\n\n    class User \u003c ActiveRecord::Base\n      include PersonName\n    end\n\n    user = User.new(\n      given_name =\u003e 'Martin',\n      middle_name =\u003e 'Luther',\n      family_name =\u003e 'King'\n    )\n\n    user.full_name =\u003e \"Martin Luther King\"\n    user.list_name =\u003e \"King, Martin Luther\"\n    user.initials =\u003e \"MLK\"\n    user.given_name_middle_name =\u003e \"Martin Luther\"\n    user.given_name_middle_initial =\u003e \"Martin L\"\n    user.given_name_middle_initial_family_name =\u003e \"Martin L King\"\n\n\n## Naming conventions\n\nYou can use either of these naming conventions:\n\n  * given name, middle name, family name\n  * first name, middle name, last name\n\n\n## Speed Tip\n\nTo make these very fast in Rails, you can use memoize:\n\n    class User \u003c ActiveRecord::Base\n      extend ActiveSupport::Memoizable\n      include PersonName\n      memoize :full_name,\n              :list_name,\n              :initials,\n              :given_name_middle_name,\n              :given_name_middle_initial,\n              :given_name_middle_initial_family_name,\n              :given_name_family_name\n    end\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsixarm%2Fsixarm_ruby_person_name","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsixarm%2Fsixarm_ruby_person_name","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsixarm%2Fsixarm_ruby_person_name/lists"}