Class: Methodical::Checklist
- Inherits:
-
Array
- Object
- Array
- Methodical::Checklist
- Defined in:
- lib/methodical/checklist.rb
Instance Attribute Summary collapse
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #<<(object) ⇒ Object
-
#initialize(title) ⇒ Checklist
constructor
A new instance of Checklist.
- #new_walkthrough ⇒ Object
- #perform_walkthrough!(baton = nil, raise_on_error = false, &block) ⇒ Object
Constructor Details
#initialize(title) ⇒ Checklist
Returns a new instance of Checklist.
8 9 10 11 |
# File 'lib/methodical/checklist.rb', line 8 def initialize(title) @title = title super([]) end |
Instance Attribute Details
#title ⇒ Object (readonly)
Returns the value of attribute title.
6 7 8 |
# File 'lib/methodical/checklist.rb', line 6 def title @title end |
Instance Method Details
#<<(object) ⇒ Object
23 24 25 26 27 |
# File 'lib/methodical/checklist.rb', line 23 def <<(object) raise ArgumentError, "No nils allowed" if object.nil? super(object) object end |
#new_walkthrough ⇒ Object
13 14 15 |
# File 'lib/methodical/checklist.rb', line 13 def new_walkthrough Walkthrough.new(self) end |
#perform_walkthrough!(baton = nil, raise_on_error = false, &block) ⇒ Object
17 18 19 20 21 |
# File 'lib/methodical/checklist.rb', line 17 def perform_walkthrough!(baton=nil, raise_on_error=false, &block) walkthrough = new_walkthrough walkthrough.perform!(baton, raise_on_error, &block) walkthrough end |