Skip to content

Commit

Permalink
Updated summoner to v1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
intinig committed Apr 2, 2014
1 parent 2157ee7 commit 5107a5b
Show file tree
Hide file tree
Showing 17 changed files with 8,876 additions and 5,480 deletions.
8 changes: 2 additions & 6 deletions lib/lol/talent.rb → lib/lol/mastery.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
module Lol
class Talent < Model
class Mastery < Model

# @!attribute [r] id
# @return [Fixnum] id of talent
attr_reader :id

# @!attribute [r] name
# @return [String] name of talent
attr_reader :name

# @!attribute [r] rank
# @return [Fixnum] rank of talent
attr_reader :rank

private

attr_writer :id, :name, :rank
attr_writer :id, :rank
end
end
10 changes: 5 additions & 5 deletions lib/lol/mastery_page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ class MasteryPage < Model
# @return [Fixnum] mastery page id
attr_reader :id

# @!attribute [r] talents
# @return [Array] array of Lol::Talent
attr_reader :talents
# @!attribute [r] masteries
# @return [Array] array of Lol::Mastery
attr_reader :masteries

# @!attribute [r] name
# @return [String] name of mastery page
Expand All @@ -21,8 +21,8 @@ class MasteryPage < Model

attr_writer :id, :name, :current

def talents= new_talents
@talents = new_talents.map {|t| Talent.new t}
def masteries= new_masteries
@masteries = new_masteries.map {|t| Mastery.new t}
end
end
end
23 changes: 0 additions & 23 deletions lib/lol/rune.rb

This file was deleted.

16 changes: 9 additions & 7 deletions lib/lol/rune_slot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@ def id
@rune_slot_id
end

# @!attribute [r] rune
# @return [Rune] rune placed in the slot
attr_reader :rune
# @!attribute [r] rune_id
# @return [Fixnum] id of Rune
def rune_id
@rune_id
end

private

def rune= rune_data
@rune = Rune.new rune_data
end

def id= new_id
@rune_slot_id = new_id
end

def rune_id= new_id
@rune_id = new_id
end

def rune_slot_id= new_id
@rune_slot_id = new_id
end
Expand Down
2 changes: 1 addition & 1 deletion lib/lol/summoner_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class SummonerRequest < Request
# Returns the supported API Version
# @return [String] the supported api version
def self.api_version
"v1.3"
"v1.4"
end

# Looks for a summoner name and returns the associated summoner
Expand Down

0 comments on commit 5107a5b

Please sign in to comment.