Class: Clashinator::Achievement

Inherits:
Object
  • Object
show all
Defined in:
lib/clashinator/achievement.rb

Overview

This class represents the achievement model through the player model

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Achievement

Returns a new instance of Achievement.



7
8
9
10
11
12
13
14
# File 'lib/clashinator/achievement.rb', line 7

def initialize(attributes)
  @name = attributes['name']
  @stars = attributes['stars']
  @value = attributes['value']
  @target = attributes['target']
  @info = attributes['info']
  @completion_info = attributes['completion_info']
end

Instance Attribute Details

#completion_infoObject

Returns the value of attribute completion_info.



5
6
7
# File 'lib/clashinator/achievement.rb', line 5

def completion_info
  @completion_info
end

#infoObject

Returns the value of attribute info.



5
6
7
# File 'lib/clashinator/achievement.rb', line 5

def info
  @info
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/clashinator/achievement.rb', line 5

def name
  @name
end

#starsObject

Returns the value of attribute stars.



5
6
7
# File 'lib/clashinator/achievement.rb', line 5

def stars
  @stars
end

#targetObject

Returns the value of attribute target.



5
6
7
# File 'lib/clashinator/achievement.rb', line 5

def target
  @target
end

#valueObject

Returns the value of attribute value.



5
6
7
# File 'lib/clashinator/achievement.rb', line 5

def value
  @value
end