Class: Checklist::Step
- Inherits:
-
Struct
- Object
- Struct
- Checklist::Step
- Defined in:
- lib/checklist/step.rb
Instance Attribute Summary collapse
-
#challenge ⇒ Object
Returns the value of attribute challenge.
-
#code ⇒ Object
Returns the value of attribute code.
-
#description ⇒ Object
Returns the value of attribute description.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#run! ⇒ Object
Run checklist’s body code.
- #to_hash ⇒ Object
Instance Attribute Details
#challenge ⇒ Object
Returns the value of attribute challenge
2 3 4 |
# File 'lib/checklist/step.rb', line 2 def challenge @challenge end |
#code ⇒ Object
Returns the value of attribute code
2 3 4 |
# File 'lib/checklist/step.rb', line 2 def code @code end |
#description ⇒ Object
Returns the value of attribute description
2 3 4 |
# File 'lib/checklist/step.rb', line 2 def description @description end |
#response ⇒ Object
Returns the value of attribute response
2 3 4 |
# File 'lib/checklist/step.rb', line 2 def response @response end |
Instance Method Details
#run! ⇒ Object
Run checklist’s body code
4 5 6 |
# File 'lib/checklist/step.rb', line 4 def run! self.code.call end |
#to_hash ⇒ Object
8 9 10 11 12 |
# File 'lib/checklist/step.rb', line 8 def to_hash { "Challenge" => self.challenge, "Response" => self.response, "Description" => self.description } end |