Class: ProconBypassMan::RemoteAction::RemoteActionObject
- Inherits:
-
Object
- Object
- ProconBypassMan::RemoteAction::RemoteActionObject
- Defined in:
- lib/procon_bypass_man/remote_action/remote_action_object.rb
Defined Under Namespace
Classes: MustBeNotNilError, NonSupportAction, ValidationError
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#steps ⇒ Object
Returns the value of attribute steps.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
Instance Method Summary collapse
-
#initialize(name:, uuid:, steps:) ⇒ RemoteActionObject
constructor
A new instance of RemoteActionObject.
- #validate! ⇒ void
Constructor Details
#initialize(name:, uuid:, steps:) ⇒ RemoteActionObject
Returns a new instance of RemoteActionObject.
12 13 14 15 16 17 |
# File 'lib/procon_bypass_man/remote_action/remote_action_object.rb', line 12 def initialize(name: , uuid:, steps: ) @name = name @uuid = uuid @steps = steps freeze end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/procon_bypass_man/remote_action/remote_action_object.rb', line 7 def name @name end |
#steps ⇒ Object
Returns the value of attribute steps.
7 8 9 |
# File 'lib/procon_bypass_man/remote_action/remote_action_object.rb', line 7 def steps @steps end |
#uuid ⇒ Object
Returns the value of attribute uuid.
7 8 9 |
# File 'lib/procon_bypass_man/remote_action/remote_action_object.rb', line 7 def uuid @uuid end |
Instance Method Details
#validate! ⇒ void
This method returns an undefined value.
22 23 24 25 26 27 |
# File 'lib/procon_bypass_man/remote_action/remote_action_object.rb', line 22 def validate! self.uuid or raise MustBeNotNilError, "uuidは値が必須です" unless self.steps.is_a?(Array) raise ValidationError, "stepsは配列です" end end |