Class: PokeApi::Common::Name

Inherits:
Object
  • Object
show all
Defined in:
lib/poke_api/common/name.rb

Overview

Name object handling lists of names and languages

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Name

Returns a new instance of Name.



8
9
10
11
# File 'lib/poke_api/common/name.rb', line 8

def initialize(data)
  @name     = data[:name]
  @language = Utility::Language.new(data[:language])
end

Instance Attribute Details

#languageObject (readonly)

Returns the value of attribute language.



5
6
7
# File 'lib/poke_api/common/name.rb', line 5

def language
  @language
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/poke_api/common/name.rb', line 5

def name
  @name
end