Exception: Flows::Result::AccessError

Inherits:
Error
  • Object
show all
Defined in:
lib/flows/result/errors.rb

Overview

Error for invalid data access cases

Since:

  • 0.4.0

Instance Method Summary collapse

Constructor Details

#initialize(result) ⇒ AccessError

Returns a new instance of AccessError.

Since:

  • 0.4.0



8
9
10
# File 'lib/flows/result/errors.rb', line 8

def initialize(result)
  @result = result
end

Instance Method Details

#messageObject

Since:

  • 0.4.0



12
13
14
15
16
17
18
19
# File 'lib/flows/result/errors.rb', line 12

def message
  [
    base_msg,
    "  Result status: `#{@result.status.inspect}`",
    "  Result data:   `#{data.inspect}`",
    "  Result meta:   `#{@result.meta.inspect}`"
  ].join("\n")
end