Project

namie

0.0
No commit activity in last 3 years
No release in over 3 years
Names as first class citizens
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 5.0
>= 0
 Project Readme

Namie

Gem Version Coverage Status Dependency Status Code Climate Build Status

                   .-.
                     ;  :                              .-.
                   .;:  :     .-.      . ,';.,';.      `-'    .-.
                  .;' \ :    ;   :     ;;  ;;  ;;     ;'    .;.-'
              .:'.;    \:    `:::'-'  ';  ;;  ';   _.;:._.   `:::'
             (__.'      `.           _;        `-'

Names as first class citizens

Install

gem 'namie'

Use

name = Name.new('Jules Verne')
name.first  # 'Jules'
name.last   # 'Verne'
name.to_s   # 'Jules Verne'

Accepts prefix, suffix and middlenames:

name = Name.new('Sir Arthur C. Clark')
name.title  # 'Sir'
name.first  # 'Arthur'
name.last   # 'Clark'
name.to_s("%l %m, %f")  # Clark C., Arthur

Accepts and detects company names and suffixes:

name = Name.new('ACME Corp LLC')
name.first  # 'ACME'
name.last   # 'Corp'
name.suffix # 'LLC'

ActiveModel

Working on it:

  • to params hash
  • cached/customizable string
  • sanitized string