Skip to content

Commit

Permalink
Remove aliases on Error class
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloh committed Oct 17, 2017
1 parent 7dadf84 commit 5df469a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions lib/pathway.rb
Expand Up @@ -33,10 +33,6 @@ class Error < StandardError

@default_messages = {}

alias :error_type :type
alias :error_message :message
alias :errors :details

def initialize(type:, message: nil, details: nil)
@type = type.to_sym
@message = message || default_message_for(type)
Expand Down
2 changes: 1 addition & 1 deletion lib/pathway/version.rb
@@ -1,3 +1,3 @@
module Pathway
VERSION = '0.0.18'
VERSION = '0.0.19'
end
4 changes: 2 additions & 2 deletions spec/plugins/responder_spec.rb
Expand Up @@ -60,8 +60,8 @@ def call(_input)
RespOperation.call(context, input) do
success { |value| "Returning: " + value }
failure(:forbidden) { |error| "Forbidden" }
failure(:validation) { |error| "Invalid: " + error.errors.join(", ") }
failure { |error| "Other: " + error.errors.join(" ") }
failure(:validation) { |error| "Invalid: " + error.details.join(", ") }
failure { |error| "Other: " + error.details.join(" ") }
end
end

Expand Down

0 comments on commit 5df469a

Please sign in to comment.