lib/sightstone/modules/summoner_module.rb
def runebook(summoner, optional={})
    region = optional[:region] || @sightstone.region
    id = if summoner.is_a? Summoner
      summoner.id
    else
      summoner
    end
    uri = "https://prod.api.pvp.net/api/lol/#{region}/v1.3/summoner/#{id}/runes"
    response = _get_api_response(uri)
    _parse_response(response) { |resp|
      data = JSON.parse(resp)
      book = RuneBook.new(data.values[0])
      if block_given?
        yield book
      else
        return book
      end
    }
  end
def runebook(summoner, optional={})
    region = optional[:region] || @sightstone.region
    id = if summoner.is_a? Summoner
      summoner.id
    else
      summoner
    end
    uri = "https://prod.api.pvp.net/api/lol/#{region}/v1.3/summoner/#{id}/runes"
    response = _get_api_response(uri)
    _parse_response(response) { |resp|
      data = JSON.parse(resp)
      book = RuneBook.new(data.values[0])
      if block_given?
        yield book
      else
        return book
      end
    }
  end
def runebook ( summoner , optional = { } ) region = optional [ :region ] || @sightstone . region id = if summoner . is_a? Summoner summoner . id else summoner end uri = "https://prod.api.pvp.net/api/lol/#{region}/v1.3/summoner/#{id}/runes" response = _get_api_response ( uri ) _parse_response ( response ) { | resp | data = JSON . parse ( resp ) book = RuneBook . new ( data . values [ 0 ] ) if block_given? yield book else return book end } end
returns the runebook of a summoner
 @param summoner [Summoner, id] summoner object or id of a summoner
 @param optional [Hash<Symbol, String>] optional arguments: :region => replaces default region
 @return [Runebook] runebook of the summoner
returns the runebook of a summoner