Class: GodvilleKit::Pantheons

Inherits:
Object
  • Object
show all
Defined in:
lib/godville_kit/pantheons.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_pantheons_data) ⇒ Pantheons

Returns a new instance of Pantheons.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/godville_kit/pantheons.rb', line 20

def initialize(raw_pantheons_data)
  pantheon_groups = raw_pantheons_data['groups'].map do |groups|
    groups['pantheons']
  end

  pantheon_groups.each do |pantheons|
    pantheons.each do |pantheon|
      case pantheon['name'].downcase
      when 'gratitude' then @gratitude = pantheon['position'].to_s
      when 'might' then @might = pantheon['position'].to_s
      when 'templehood' then @templehood = pantheon['position'].to_s
      when 'gladiatorship' then @gladiatorship = pantheon['position'].to_s
      when 'storytelling' then @storytelling = pantheon['position'].to_s
      when 'mastery' then @mastery = pantheon['position'].to_s
      when 'taming' then @taming = pantheon['position'].to_s
      when 'survival' then @survival = pantheon['position'].to_s
      when 'creation' then @creation = pantheon['position'].to_s
      when 'destruction' then @destruction = pantheon['position'].to_s
      when 'arkeology' then @arkeology = pantheon['position'].to_s
      when 'unity' then @unity = pantheon['position'].to_s
      when 'popularity' then @popularity = pantheon['position'].to_s
      when 'aggressiveness' then @aggressiveness = pantheon['position'].to_s
      end
    end
  end
end

Instance Attribute Details

#aggressivenessObject (readonly)

Returns the value of attribute aggressiveness.



3
4
5
# File 'lib/godville_kit/pantheons.rb', line 3

def aggressiveness
  @aggressiveness
end

#arkeologyObject (readonly)

Returns the value of attribute arkeology.



3
4
5
# File 'lib/godville_kit/pantheons.rb', line 3

def arkeology
  @arkeology
end

#constructionObject (readonly)

Returns the value of attribute construction.



3
4
5
# File 'lib/godville_kit/pantheons.rb', line 3

def construction
  @construction
end

#creationObject (readonly)

Returns the value of attribute creation.



3
4
5
# File 'lib/godville_kit/pantheons.rb', line 3

def creation
  @creation
end

#destructionObject (readonly)

Returns the value of attribute destruction.



3
4
5
# File 'lib/godville_kit/pantheons.rb', line 3

def destruction
  @destruction
end

#gladiatorshipObject (readonly)

Returns the value of attribute gladiatorship.



3
4
5
# File 'lib/godville_kit/pantheons.rb', line 3

def gladiatorship
  @gladiatorship
end

#gratitudeObject (readonly)

Returns the value of attribute gratitude.



3
4
5
# File 'lib/godville_kit/pantheons.rb', line 3

def gratitude
  @gratitude
end

#masteryObject (readonly)

Returns the value of attribute mastery.



3
4
5
# File 'lib/godville_kit/pantheons.rb', line 3

def mastery
  @mastery
end

#mightObject (readonly)

Returns the value of attribute might.



3
4
5
# File 'lib/godville_kit/pantheons.rb', line 3

def might
  @might
end

#popularityObject (readonly)

Returns the value of attribute popularity.



3
4
5
# File 'lib/godville_kit/pantheons.rb', line 3

def popularity
  @popularity
end

#savingsObject (readonly)

Returns the value of attribute savings.



3
4
5
# File 'lib/godville_kit/pantheons.rb', line 3

def savings
  @savings
end

#storytellingObject (readonly)

Returns the value of attribute storytelling.



3
4
5
# File 'lib/godville_kit/pantheons.rb', line 3

def storytelling
  @storytelling
end

#survivalObject (readonly)

Returns the value of attribute survival.



3
4
5
# File 'lib/godville_kit/pantheons.rb', line 3

def survival
  @survival
end

#tamingObject (readonly)

Returns the value of attribute taming.



3
4
5
# File 'lib/godville_kit/pantheons.rb', line 3

def taming
  @taming
end

#templehoodObject (readonly)

Returns the value of attribute templehood.



3
4
5
# File 'lib/godville_kit/pantheons.rb', line 3

def templehood
  @templehood
end

#unityObject (readonly)

Returns the value of attribute unity.



3
4
5
# File 'lib/godville_kit/pantheons.rb', line 3

def unity
  @unity
end