Exception: Graphiti::Errors::RequiredFilter
- Defined in:
- lib/graphiti/errors.rb
Instance Method Summary collapse
-
#initialize(resource, attributes) ⇒ RequiredFilter
constructor
A new instance of RequiredFilter.
- #message ⇒ Object
Constructor Details
#initialize(resource, attributes) ⇒ RequiredFilter
Returns a new instance of RequiredFilter.
801 802 803 804 |
# File 'lib/graphiti/errors.rb', line 801 def initialize(resource, attributes) @resource = resource @attributes = Array(attributes) end |
Instance Method Details
#message ⇒ Object
806 807 808 809 810 811 812 |
# File 'lib/graphiti/errors.rb', line 806 def if @attributes.length > 1 "The required filters \"#{@attributes.join(", ")}\" on resource #{@resource.class} were not provided" else "The required filter \"#{@attributes[0]}\" on resource #{@resource.class} was not provided" end end |