Exception: RemoteResource::BaseClassNotFound

Inherits:
Error
  • Object
show all
Defined in:
lib/remote_resource/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(which_klass) ⇒ BaseClassNotFound

Returns a new instance of BaseClassNotFound.



25
26
27
28
# File 'lib/remote_resource/errors.rb', line 25

def initialize(which_klass)
  @which_klass = which_klass
  super(message)
end

Instance Method Details

#messageObject



30
31
32
33
34
35
36
37
38
# File 'lib/remote_resource/errors.rb', line 30

def message
  <<-MESSAGE.strip_heredoc

    A RemoteResource::Base class descendant named `#{@which_klass}`
    could not be found. Descendant class names are generally suffixed with
    'Attributes' and looked up without the attributes symbol. Example: A
    base class named 'GithubUserAttributes' is looked up with :github_user.
  MESSAGE
end