Class: NameParser::Parser
- Inherits:
-
Object
- Object
- NameParser::Parser
- Includes:
- Patterns
- Defined in:
- lib/name_parser/parser.rb
Constant Summary
Constants included from Patterns
NameParser::Patterns::EDUCATOR, NameParser::Patterns::LAST_NAME_PATTERN, NameParser::Patterns::LEGAL, NameParser::Patterns::MEDICINE, NameParser::Patterns::MILITARY, NameParser::Patterns::NAME_PATTERN, NameParser::Patterns::POLICE, NameParser::Patterns::POLITICIAN, NameParser::Patterns::RELIGIOUS, NameParser::Patterns::ROYALTY, NameParser::Patterns::STANDARD, NameParser::Patterns::SUFFIX_PATTERN, NameParser::Patterns::TITLE_PATTERN
Instance Attribute Summary collapse
-
#first ⇒ Object
readonly
Returns the value of attribute first.
-
#last ⇒ Object
readonly
Returns the value of attribute last.
-
#middle ⇒ Object
readonly
Returns the value of attribute middle.
-
#suffix ⇒ Object
readonly
Returns the value of attribute suffix.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(name) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(name) ⇒ Parser
Returns a new instance of Parser.
7 8 9 10 |
# File 'lib/name_parser/parser.rb', line 7 def initialize(name) @name = name.dup run end |
Instance Attribute Details
#first ⇒ Object (readonly)
Returns the value of attribute first.
5 6 7 |
# File 'lib/name_parser/parser.rb', line 5 def first @first end |
#last ⇒ Object (readonly)
Returns the value of attribute last.
5 6 7 |
# File 'lib/name_parser/parser.rb', line 5 def last @last end |
#middle ⇒ Object (readonly)
Returns the value of attribute middle.
5 6 7 |
# File 'lib/name_parser/parser.rb', line 5 def middle @middle end |
#suffix ⇒ Object (readonly)
Returns the value of attribute suffix.
5 6 7 |
# File 'lib/name_parser/parser.rb', line 5 def suffix @suffix end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
5 6 7 |
# File 'lib/name_parser/parser.rb', line 5 def title @title end |