Class: Covetous::Data::Follower
- Defined in:
- lib/covetous/data/follower.rb
Constant Summary collapse
- FOLLOWER_TYPES =
%w{enchantress scoundrel templar}
Instance Attribute Summary
Attributes inherited from Shen
Instance Method Summary collapse
-
#initialize(follower_type) ⇒ Follower
constructor
A new instance of Follower.
Methods inherited from Shen
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