Class: ForemanMaintain::Utils::Response
- Inherits:
-
Object
- Object
- ForemanMaintain::Utils::Response
- Defined in:
- lib/foreman_maintain/utils/response.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(success, message, data: {}) ⇒ Response
constructor
A new instance of Response.
- #success? ⇒ Boolean
Constructor Details
#initialize(success, message, data: {}) ⇒ Response
Returns a new instance of Response.
6 7 8 9 10 |
# File 'lib/foreman_maintain/utils/response.rb', line 6 def initialize(success, , data: {}) @success = success @message = @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
4 5 6 |
# File 'lib/foreman_maintain/utils/response.rb', line 4 def data @data end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/foreman_maintain/utils/response.rb', line 4 def @message end |
Instance Method Details
#success? ⇒ Boolean
12 13 14 |
# File 'lib/foreman_maintain/utils/response.rb', line 12 def success? !!@success end |