Module: Unchained::Client::Factions
- Included in:
- Unchained::Client
- Defined in:
- lib/unchained/client/factions.rb
Defined Under Namespace
Classes: Faction
Instance Method Summary collapse
Instance Method Details
#faction(id, opts = {}) ⇒ Object
22 23 24 |
# File 'lib/unchained/client/factions.rb', line 22 def faction(id, opts={}) factions(opts).find {|f| f.id == id} end |
#factions(opts = {}) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/unchained/client/factions.rb', line 14 def factions(opts={}) @cache[:factions] ||= get_resources( "#{base_url}/gamedata/factions", Faction, opts, ) end |