Class: ProconBypassMan::RemotePbmJobObject
- Inherits:
-
Object
- Object
- ProconBypassMan::RemotePbmJobObject
- Defined in:
- lib/procon_bypass_man/remote_action/remote_pbm_job/value_objects/remote_pbm_job_object.rb
Defined Under Namespace
Classes: MustBeNotNilError, NonSupportAction, ValidationError
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#job_args ⇒ Object
Returns the value of attribute job_args.
-
#status ⇒ Object
Returns the value of attribute status.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
Instance Method Summary collapse
-
#initialize(action:, status:, uuid:, created_at:, job_args:) ⇒ RemotePbmJobObject
constructor
A new instance of RemotePbmJobObject.
- #validate! ⇒ void
Constructor Details
#initialize(action:, status:, uuid:, created_at:, job_args:) ⇒ RemotePbmJobObject
Returns a new instance of RemotePbmJobObject.
15 16 17 18 19 20 21 22 23 |
# File 'lib/procon_bypass_man/remote_action/remote_pbm_job/value_objects/remote_pbm_job_object.rb', line 15 def initialize(action: , status:, uuid:, created_at:, job_args: ) self.action = action self.status = status self.uuid = uuid self.created_at = created_at self.job_args = job_args freeze end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
8 9 10 |
# File 'lib/procon_bypass_man/remote_action/remote_pbm_job/value_objects/remote_pbm_job_object.rb', line 8 def action @action end |
#created_at ⇒ Object
Returns the value of attribute created_at.
8 9 10 |
# File 'lib/procon_bypass_man/remote_action/remote_pbm_job/value_objects/remote_pbm_job_object.rb', line 8 def created_at @created_at end |
#job_args ⇒ Object
Returns the value of attribute job_args.
8 9 10 |
# File 'lib/procon_bypass_man/remote_action/remote_pbm_job/value_objects/remote_pbm_job_object.rb', line 8 def job_args @job_args end |
#status ⇒ Object
Returns the value of attribute status.
8 9 10 |
# File 'lib/procon_bypass_man/remote_action/remote_pbm_job/value_objects/remote_pbm_job_object.rb', line 8 def status @status end |
#uuid ⇒ Object
Returns the value of attribute uuid.
8 9 10 |
# File 'lib/procon_bypass_man/remote_action/remote_pbm_job/value_objects/remote_pbm_job_object.rb', line 8 def uuid @uuid end |
Instance Method Details
#validate! ⇒ void
This method returns an undefined value.
28 29 30 31 32 33 34 35 36 |
# File 'lib/procon_bypass_man/remote_action/remote_pbm_job/value_objects/remote_pbm_job_object.rb', line 28 def validate! self.action or raise MustBeNotNilError, "actionは値が必須です" self.status or raise MustBeNotNilError, "statusは値が必須です" self.uuid or raise MustBeNotNilError, "uuidは値が必須です" unless ProconBypassMan::RemoteAction::RemotePbmJob::ACTIONS.include?(action) raise NonSupportAction, "知らないアクションです" end end |