Class: LeagueOfLegends::Request::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/league_of_legends/request/mapper.rb

Class Method Summary collapse

Class Method Details

.availableObject



19
20
21
# File 'lib/league_of_legends/request/mapper.rb', line 19

def available
  map.keys
end

.available?(request_name) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/league_of_legends/request/mapper.rb', line 15

def available? request_name
  map.has_key? request_name
end

.get(request_name) ⇒ Object



7
8
9
# File 'lib/league_of_legends/request/mapper.rb', line 7

def get request_name
  get_info(request_name)[:class]
end

.get_info(request_name) ⇒ Object



11
12
13
# File 'lib/league_of_legends/request/mapper.rb', line 11

def get_info request_name
  map[request_name.to_sym]
end