Exception: WrapperBased::RoleUnknown
- Inherits:
-
NoMethodError
- Object
- NoMethodError
- WrapperBased::RoleUnknown
- Defined in:
- lib/wrapper_based/role_unknown.rb
Class Method Summary collapse
Class Method Details
.or(error) ⇒ Object
3 4 5 6 |
# File 'lib/wrapper_based/role_unknown.rb', line 3 def self.or(error) return error unless error. =~ /^undefined method `with_(\w..)/ new error..sub('undefined method', 'unknown role').sub('with_','').sub('!','') end |