Exception: RSS::NotAvailableValueError

Inherits:
InvalidRSSError show all
Defined in:
lib/rss/rss.rb

Overview

Attributes are in key-value form, and if there’s no value provided for an attribute, a NotAvailableValueError will be raised.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tag, value, attribute = nil) ⇒ NotAvailableValueError

Returns a new instance of NotAvailableValueError.



151
152
153
154
155
156
157
# File 'lib/rss/rss.rb', line 151

def initialize(tag, value, attribute=nil)
  @tag, @value, @attribute = tag, value, attribute
  message = "value <#{value}> of "
  message << "attribute <#{attribute}> of " if attribute
  message << "tag <#{tag}> is not available."
  super(message)
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



150
151
152
# File 'lib/rss/rss.rb', line 150

def attribute
  @attribute
end

#tagObject (readonly)

Returns the value of attribute tag.



150
151
152
# File 'lib/rss/rss.rb', line 150

def tag
  @tag
end

#valueObject (readonly)

Returns the value of attribute value.



150
151
152
# File 'lib/rss/rss.rb', line 150

def value
  @value
end