Exception: Moxml::NotImplementedError
- Defined in:
- lib/moxml/error.rb
Overview
Error raised when a feature is not implemented by an adapter
Instance Attribute Summary collapse
-
#adapter ⇒ Object
readonly
Returns the value of attribute adapter.
-
#feature ⇒ Object
readonly
Returns the value of attribute feature.
Instance Method Summary collapse
-
#initialize(message = nil, feature: nil, adapter: nil) ⇒ NotImplementedError
constructor
A new instance of NotImplementedError.
- #to_s ⇒ Object
Constructor Details
#initialize(message = nil, feature: nil, adapter: nil) ⇒ NotImplementedError
Returns a new instance of NotImplementedError.
132 133 134 135 136 137 |
# File 'lib/moxml/error.rb', line 132 def initialize( = nil, feature: nil, adapter: nil) @feature = feature @adapter = adapter ||= "Feature not implemented" super() end |
Instance Attribute Details
#adapter ⇒ Object (readonly)
Returns the value of attribute adapter.
130 131 132 |
# File 'lib/moxml/error.rb', line 130 def adapter @adapter end |
#feature ⇒ Object (readonly)
Returns the value of attribute feature.
130 131 132 |
# File 'lib/moxml/error.rb', line 130 def feature @feature end |
Instance Method Details
#to_s ⇒ Object
139 140 141 142 143 144 145 |
# File 'lib/moxml/error.rb', line 139 def to_s msg = super msg += "\n Feature: #{@feature}" if @feature msg += "\n Adapter: #{@adapter}" if @adapter msg += "\n Hint: This feature may not be supported by the current adapter" msg end |