Class: Velocify::Model::Request
- Inherits:
-
Object
- Object
- Velocify::Model::Request
- Defined in:
- lib/velocify/model.rb
Instance Attribute Summary collapse
-
#destruct_response ⇒ Object
writeonly
Sets the attribute destruct_response.
-
#operation ⇒ Object
Returns the value of attribute operation.
- #payload ⇒ Object
-
#requires_auth ⇒ Object
writeonly
Sets the attribute requires_auth.
-
#transform ⇒ Object
Returns the value of attribute transform.
Instance Method Summary collapse
- #authenticate(username:, password:) ⇒ Object
- #destruct_response? ⇒ Boolean
-
#initialize ⇒ Request
constructor
A new instance of Request.
- #requires_auth? ⇒ Boolean
Constructor Details
#initialize ⇒ Request
Returns a new instance of Request.
49 50 51 52 |
# File 'lib/velocify/model.rb', line 49 def initialize @destruct_response = false @requires_auth = false end |
Instance Attribute Details
#destruct_response=(value) ⇒ Object (writeonly)
Sets the attribute destruct_response
45 46 47 |
# File 'lib/velocify/model.rb', line 45 def destruct_response=(value) @destruct_response = value end |
#operation ⇒ Object
Returns the value of attribute operation.
47 48 49 |
# File 'lib/velocify/model.rb', line 47 def operation @operation end |
#payload ⇒ Object
62 63 64 |
# File 'lib/velocify/model.rb', line 62 def payload @payload.render end |
#requires_auth=(value) ⇒ Object (writeonly)
Sets the attribute requires_auth
45 46 47 |
# File 'lib/velocify/model.rb', line 45 def requires_auth=(value) @requires_auth = value end |
#transform ⇒ Object
Returns the value of attribute transform.
46 47 48 |
# File 'lib/velocify/model.rb', line 46 def transform @transform end |
Instance Method Details
#authenticate(username:, password:) ⇒ Object
54 55 56 |
# File 'lib/velocify/model.rb', line 54 def authenticate username:, password: @payload.authenticate username: username, password: password end |
#destruct_response? ⇒ Boolean
66 |
# File 'lib/velocify/model.rb', line 66 def destruct_response? ; @destruct_response ; end |
#requires_auth? ⇒ Boolean
67 |
# File 'lib/velocify/model.rb', line 67 def requires_auth? ; @requires_auth ; end |