Exception: JsonApiResponders::Errors::InvalidRenderMethodError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(render_method) ⇒ InvalidRenderMethodError

Returns a new instance of InvalidRenderMethodError.



39
40
41
42
# File 'lib/json_api_responders/errors.rb', line 39

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

Instance Attribute Details

#render_methodObject (readonly)

Returns the value of attribute render_method.



37
38
39
# File 'lib/json_api_responders/errors.rb', line 37

def render_method
  @render_method
end

Instance Method Details

#messageObject



44
45
46
# File 'lib/json_api_responders/errors.rb', line 44

def message
  "#{render_method} render method is invalid, must be one of: #{JsonApiResponders::Config::RENDER_METHODS}"
end