Class: Covetous::Data::Follower

Inherits:
Shen
  • Object
show all
Defined in:
lib/covetous/data/follower.rb

Constant Summary collapse

FOLLOWER_TYPES =
%w{enchantress scoundrel templar}

Instance Attribute Summary

Attributes inherited from Shen

#response, #url

Instance Method Summary collapse

Methods inherited from Shen

#method_missing

Constructor Details

#initialize(follower_type) ⇒ Follower

Returns a new instance of Follower.



9
10
11
12
13
14
# File 'lib/covetous/data/follower.rb', line 9

def initialize(follower_type)
  raise UnknownFollowerTypeError, "Please only use a follower type from: #{FOLLOWER_TYPES.to_s}" unless FOLLOWER_TYPES.include? follower_type
  @url = "#{Covetous::Data::BASE_URL}/follower/#{follower_type}"

  super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Covetous::Shen