Exception: MarketTown::Checkout::Error

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/market_town/checkout/error.rb

Instance Method Summary collapse

Instance Method Details

#errorObject



4
5
6
7
8
9
10
11
12
# File 'lib/market_town/checkout/error.rb', line 4

def error
  self.class.name.sub('MarketTown::Checkout::', '')
                 .split('::')
                 .join('_')
                 .gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
                 .gsub(/([a-z])([A-Z])/, '\1_\2')
                 .downcase
                 .to_sym
end