Exception: AlreadySubscribedError

Inherits:
StandardError
  • Object
show all
Defined in:
app/errors/already_subscribed_error.rb

Overview

Error raised when a user tries to subscribe to a feed he's already subscribed to.

Besides its StandardError inheritence, it adds a 'feed' attribute that has the feed to which the user is already subscribed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(feed) ⇒ AlreadySubscribedError

Returns a new instance of AlreadySubscribedError.


9
10
11
# File 'app/errors/already_subscribed_error.rb', line 9

def initialize(feed)
  @feed = feed
end

Instance Attribute Details

#feedObject (readonly)

Returns the value of attribute feed


7
8
9
# File 'app/errors/already_subscribed_error.rb', line 7

def feed
  @feed
end