Class: PokeApi::Common::Effect

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

Overview

Effect object handling lists of effects and languages

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Effect

Returns a new instance of Effect.



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

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

Instance Attribute Details

#effectObject (readonly)

Returns the value of attribute effect.



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

def effect
  @effect
end

#languageObject (readonly)

Returns the value of attribute language.



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

def language
  @language
end