Class: TDL::ValidResponse
- Inherits:
-
Object
- Object
- TDL::ValidResponse
- Defined in:
- lib/tdl/abstractions/response/valid_response.rb
Instance Attribute Summary collapse
-
#client_action ⇒ Object
readonly
Returns the value of attribute client_action.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #audit_text ⇒ Object
-
#initialize(id, result, client_action) ⇒ ValidResponse
constructor
A new instance of ValidResponse.
- #to_h ⇒ Object
Constructor Details
#initialize(id, result, client_action) ⇒ ValidResponse
Returns a new instance of ValidResponse.
7 8 9 10 11 |
# File 'lib/tdl/abstractions/response/valid_response.rb', line 7 def initialize(id, result, client_action) @id = id @result = result @client_action = client_action end |
Instance Attribute Details
#client_action ⇒ Object (readonly)
Returns the value of attribute client_action.
5 6 7 |
# File 'lib/tdl/abstractions/response/valid_response.rb', line 5 def client_action @client_action end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/tdl/abstractions/response/valid_response.rb', line 5 def id @id end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
5 6 7 |
# File 'lib/tdl/abstractions/response/valid_response.rb', line 5 def result @result end |
Instance Method Details
#audit_text ⇒ Object
21 22 23 |
# File 'lib/tdl/abstractions/response/valid_response.rb', line 21 def audit_text "resp = #{TDL::Util.compress_data(@result)}" end |
#to_h ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/tdl/abstractions/response/valid_response.rb', line 13 def to_h { :result => @result, :error => nil, :id => @id, } end |