Exception: Exceptions::OxenStandardError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ OxenStandardError

Returns a new instance of OxenStandardError.



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/exceptions.rb', line 14

def initialize(options = {})
  if options.is_a? String
    message = options
  else
    # @query  = options[:query]
    # @record = options[:record]
    # @policy = options[:policy]
    #
    message = options.fetch(:message) { "OXEN says: no reason was given - error class is %s" % self.class.to_s }
  end

  super(message)
end

Instance Attribute Details

#policyObject (readonly)

Returns the value of attribute policy.



12
13
14
# File 'lib/exceptions.rb', line 12

def policy
  @policy
end

#queryObject (readonly)

Returns the value of attribute query.



12
13
14
# File 'lib/exceptions.rb', line 12

def query
  @query
end

#recordObject (readonly)

Returns the value of attribute record.



12
13
14
# File 'lib/exceptions.rb', line 12

def record
  @record
end