Exception: InterMine::Metadata::PathException
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- InterMine::Metadata::PathException
- Defined in:
- lib/intermine/model.rb
Overview
An exception class for handling path parsing errors.
Instance Attribute Summary collapse
-
#pathstring ⇒ Object
readonly
Returns the value of attribute pathstring.
-
#subclasses ⇒ Object
readonly
Returns the value of attribute subclasses.
Instance Method Summary collapse
-
#initialize(pathstring = nil, subclasses = {}, message = nil) ⇒ PathException
constructor
A new instance of PathException.
-
#to_s ⇒ Object
The string representation.
Constructor Details
#initialize(pathstring = nil, subclasses = {}, message = nil) ⇒ PathException
Returns a new instance of PathException.
887 888 889 890 891 |
# File 'lib/intermine/model.rb', line 887 def initialize(pathstring=nil, subclasses={}, =nil) @pathstring = pathstring @subclasses = subclasses @message = end |
Instance Attribute Details
#pathstring ⇒ Object (readonly)
Returns the value of attribute pathstring.
885 886 887 |
# File 'lib/intermine/model.rb', line 885 def pathstring @pathstring end |
#subclasses ⇒ Object (readonly)
Returns the value of attribute subclasses.
885 886 887 |
# File 'lib/intermine/model.rb', line 885 def subclasses @subclasses end |
Instance Method Details
#to_s ⇒ Object
The string representation.
894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 |
# File 'lib/intermine/model.rb', line 894 def to_s if @pathstring.nil? if @message.nil? return self.class.name else return @message end end preamble = "Unable to resolve '#{@pathstring}': " = " (SUBCLASSES => #{@subclasses.inspect})" if @message.nil? return preamble + else return preamble + @message + end end |