Exception: RSS::ConversionError

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

Overview

Raised when a conversion failure occurs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string, to, from) ⇒ ConversionError

Returns a new instance of ConversionError.



175
176
177
178
179
180
# File 'lib/rss/rss.rb', line 175

def initialize(string, to, from)
  @string = string
  @to = to
  @from = from
  super("can't convert #{@string} to #{to} from #{from}.")
end

Instance Attribute Details

#fromObject (readonly)

Returns the value of attribute from.



174
175
176
# File 'lib/rss/rss.rb', line 174

def from
  @from
end

#stringObject (readonly)

Returns the value of attribute string.



174
175
176
# File 'lib/rss/rss.rb', line 174

def string
  @string
end

#toObject (readonly)

Returns the value of attribute to.



174
175
176
# File 'lib/rss/rss.rb', line 174

def to
  @to
end