class Exceptions::Base
Attributes
object[RW]
type[RW]
Public Class Methods
build(object)
click to toggle source
standard error for Models @param [ActiveRecord::Base] object @return [Exceptions::Base]
# File lib/exceptions/base.rb, line 13 def self.build object exception = new object return exception end
new(object)
click to toggle source
starts a new instance with an object @param [Object] object
# File lib/exceptions/base.rb, line 6 def initialize object self.object = object end
Public Instance Methods
model?()
click to toggle source
return if is as model error @return [Boolean]
# File lib/exceptions/base.rb, line 26 def model? self.class.name.demodulize.tableize.singularize == "model" end
simple?()
click to toggle source
return if is as simple error @return [Boolean]
# File lib/exceptions/base.rb, line 20 def simple? self.class.name.demodulize.tableize.singularize == "simple" end