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.



178
179
180
181
182
183
# File 'lib/rss/rss.rb', line 178

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.



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

def from
  @from
end

#stringObject (readonly)

Returns the value of attribute string.



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

def string
  @string
end

#toObject (readonly)

Returns the value of attribute to.



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

def to
  @to
end