Exception: Routemaster::Errors::BaseError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/routemaster/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env) ⇒ BaseError

Returns a new instance of BaseError.



6
7
8
9
# File 'lib/routemaster/errors.rb', line 6

def initialize(env)
  @env = env
  super(message)
end

Instance Attribute Details

#envObject (readonly)

Returns the value of attribute env.



4
5
6
# File 'lib/routemaster/errors.rb', line 4

def env
  @env
end

Instance Method Details

#bodyObject



19
20
21
# File 'lib/routemaster/errors.rb', line 19

def body
  @body ||= deserialized_body
end

#errorsObject



11
12
13
# File 'lib/routemaster/errors.rb', line 11

def errors
  body.fetch('errors', {})
end

#messageObject

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/routemaster/errors.rb', line 15

def message
  raise NotImplementedError
end