Class: European::NameInterpreter
- Inherits:
-
Object
- Object
- European::NameInterpreter
- Defined in:
- lib/european/name_interpreter.rb
Instance Method Summary collapse
-
#initialize(name) ⇒ NameInterpreter
constructor
A new instance of NameInterpreter.
- #name ⇒ Object
- #prefix ⇒ Object
Constructor Details
#initialize(name) ⇒ NameInterpreter
Returns a new instance of NameInterpreter.
4 5 6 |
# File 'lib/european/name_interpreter.rb', line 4 def initialize(name) @name = name end |
Instance Method Details
#name ⇒ Object
12 13 14 |
# File 'lib/european/name_interpreter.rb', line 12 def name @name[@name.index('/')+1..-1] end |
#prefix ⇒ Object
8 9 10 |
# File 'lib/european/name_interpreter.rb', line 8 def prefix @name[0..@name.index('/')-1] end |