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.



163
164
165
166
167
168
# File 'lib/rss/rss.rb', line 163

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



162
163
164
# File 'lib/rss/rss.rb', line 162

def from
  @from
end

#stringObject (readonly)

Returns the value of attribute string



162
163
164
# File 'lib/rss/rss.rb', line 162

def string
  @string
end

#toObject (readonly)

Returns the value of attribute to



162
163
164
# File 'lib/rss/rss.rb', line 162

def to
  @to
end