Module: SimpleResponse
- Defined in:
- lib/simple_response.rb,
lib/simple_response/version.rb,
lib/simple_response/response.rb,
lib/simple_response/query_methods.rb,
lib/simple_response/simple_struct.rb
Defined Under Namespace
Modules: QueryMethods
Classes: Response, SimpleStruct
Constant Summary
collapse
- VERSION =
'0.11.0'.freeze
Class Method Summary
collapse
Class Method Details
.failure(attributes = {}) ⇒ Object
13
14
15
|
# File 'lib/simple_response.rb', line 13
def self.failure(attributes = {})
new(success: false, **attributes)
end
|
.new(success: true, **attributes) ⇒ Object
5
6
7
|
# File 'lib/simple_response.rb', line 5
def self.new(success: true, **attributes)
SimpleResponse::Response.new(success: success, **attributes)
end
|
.success(attributes = {}) ⇒ Object
9
10
11
|
# File 'lib/simple_response.rb', line 9
def self.success(attributes = {})
new(success: true, **attributes)
end
|