Skip to content

Commit

Permalink
avoid unintended conflict of namespace, fixes #64
Browse files Browse the repository at this point in the history
  • Loading branch information
namusyaka committed Jun 9, 2017
1 parent 0ba0411 commit d3c9531
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mustermann/lib/mustermann/error.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# frozen_string_literal: true
module Mustermann
Error ||= Class.new(StandardError) # Raised if anything goes wrong while generating a {Pattern}.
CompileError ||= Class.new(Error) # Raised if anything goes wrong while compiling a {Pattern}.
ParseError ||= Class.new(Error) # Raised if anything goes wrong while parsing a {Pattern}.
ExpandError ||= Class.new(Error) # Raised if anything goes wrong while expanding a {Pattern}.
unless defined?(Mustermann::Error)
Error = Class.new(StandardError) # Raised if anything goes wrong while generating a {Pattern}.
CompileError = Class.new(Error) # Raised if anything goes wrong while compiling a {Pattern}.
ParseError = Class.new(Error) # Raised if anything goes wrong while parsing a {Pattern}.
ExpandError = Class.new(Error) # Raised if anything goes wrong while expanding a {Pattern}.
end
end

0 comments on commit d3c9531

Please sign in to comment.