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.
174 175 176 177 178 179 |
# File 'lib/moxml/error.rb', line 174 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.
172 173 174 |
# File 'lib/moxml/error.rb', line 172 def adapter @adapter end |
#feature ⇒ Object (readonly)
Returns the value of attribute feature.
172 173 174 |
# File 'lib/moxml/error.rb', line 172 def feature @feature end |
Instance Method Details
#to_s ⇒ Object
181 182 183 184 185 186 187 |
# File 'lib/moxml/error.rb', line 181 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 |