Class: ApprovalHub::Request
- Inherits:
-
Object
- Object
- ApprovalHub::Request
- Defined in:
- lib/approval_hub/request.rb
Overview
A Request is passed to the hub for registration
Instance Attribute Summary collapse
-
#approver_id ⇒ Object
Returns the value of attribute approver_id.
-
#long_description ⇒ Object
Returns the value of attribute long_description.
-
#request_id ⇒ Object
Returns the value of attribute request_id.
-
#requestor_id ⇒ Object
Returns the value of attribute requestor_id.
-
#short_description ⇒ Object
Returns the value of attribute short_description.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#is_valid? ⇒ Boolean
Will return false if fields have not been set TODO - return an errors hash stating why the request is not valid.
Instance Attribute Details
#approver_id ⇒ Object
Returns the value of attribute approver_id.
6 7 8 |
# File 'lib/approval_hub/request.rb', line 6 def approver_id @approver_id end |
#long_description ⇒ Object
Returns the value of attribute long_description.
5 6 7 |
# File 'lib/approval_hub/request.rb', line 5 def long_description @long_description end |
#request_id ⇒ Object
Returns the value of attribute request_id.
5 6 7 |
# File 'lib/approval_hub/request.rb', line 5 def request_id @request_id end |
#requestor_id ⇒ Object
Returns the value of attribute requestor_id.
6 7 8 |
# File 'lib/approval_hub/request.rb', line 6 def requestor_id @requestor_id end |
#short_description ⇒ Object
Returns the value of attribute short_description.
5 6 7 |
# File 'lib/approval_hub/request.rb', line 5 def short_description @short_description end |
#url ⇒ Object
Returns the value of attribute url.
6 7 8 |
# File 'lib/approval_hub/request.rb', line 6 def url @url end |
Instance Method Details
#is_valid? ⇒ Boolean
Will return false if fields have not been set TODO - return an errors hash stating why the request is not valid
10 11 12 13 14 15 16 17 |
# File 'lib/approval_hub/request.rb', line 10 def is_valid? not request_id.nil? || long_description.nil? || short_description.nil? || requestor_id.nil? || approver_id.nil? || url.nil? end |