standup_md 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -562,7 +562,7 @@
562
562
 
563
563
  <p>Writes a new entry to the file if the first entry in the file isn&#39;t today. This method is destructive; if a file for entries in the date range already exists, it will be clobbered with the entries in the range.</p>
564
564
 
565
- <p>@param [Hash] start_and_end_date</p>
565
+ <p>@param [Hash] {start_date: Date, end_date: Date}</p>
566
566
 
567
567
  <p>@return [Boolean] true if successful</p>
568
568
 
@@ -579,9 +579,9 @@
579
579
  <span class="ruby-identifier">sorted_entries</span>.<span class="ruby-identifier">filter</span>(<span class="ruby-identifier">start_date</span>, <span class="ruby-identifier">end_date</span>).<span class="ruby-identifier">sort_reverse</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span>
580
580
  <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">header</span>(<span class="ruby-identifier">entry</span>.<span class="ruby-identifier">date</span>)
581
581
  <span class="ruby-ivar">@config</span>.<span class="ruby-identifier">sub_header_order</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">attr</span><span class="ruby-operator">|</span>
582
- <span class="ruby-identifier">tasks</span> = <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">attr</span>)
582
+ <span class="ruby-identifier">tasks</span> = <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">public_send</span>(<span class="ruby-identifier">attr</span>)
583
583
  <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">tasks</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">empty?</span>
584
- <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">sub_header</span>(<span class="ruby-ivar">@config</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">&quot;#{attr}_header&quot;</span>).<span class="ruby-identifier">capitalize</span>)
584
+ <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">sub_header</span>(<span class="ruby-ivar">@config</span>.<span class="ruby-identifier">public_send</span>(<span class="ruby-node">&quot;#{attr}_header&quot;</span>).<span class="ruby-identifier">capitalize</span>)
585
585
  <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-ivar">@config</span>.<span class="ruby-identifier">bullet_character</span> <span class="ruby-operator">+</span> <span class="ruby-string">&#39; &#39;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">task</span> }
586
586
  <span class="ruby-keyword">end</span>
587
587
  <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span>
@@ -1,15 +1,15 @@
1
- Sun, 14 Jun 2020 22:02:40 -0500
2
- README.md Sun, 14 Jun 2020 22:02:07 -0500
3
- lib/standup_md.rb Sun, 14 Jun 2020 22:01:32 -0500
1
+ Tue, 23 Jun 2020 14:45:39 -0500
2
+ README.md Wed, 17 Jun 2020 21:10:35 -0500
3
+ lib/standup_md.rb Wed, 17 Jun 2020 08:47:50 -0500
4
4
  lib/standup_md/cli.rb Sun, 14 Jun 2020 22:01:32 -0500
5
- lib/standup_md/cli/helpers.rb Sun, 14 Jun 2020 22:01:32 -0500
6
- lib/standup_md/config.rb Sun, 14 Jun 2020 22:01:32 -0500
7
- lib/standup_md/config/cli.rb Sun, 14 Jun 2020 22:01:32 -0500
8
- lib/standup_md/config/entry.rb Sun, 14 Jun 2020 22:01:32 -0500
9
- lib/standup_md/config/entry_list.rb Sun, 14 Jun 2020 22:01:32 -0500
10
- lib/standup_md/config/file.rb Sun, 14 Jun 2020 22:01:32 -0500
11
- lib/standup_md/entry.rb Sun, 14 Jun 2020 22:01:32 -0500
12
- lib/standup_md/entry_list.rb Sun, 14 Jun 2020 22:01:32 -0500
13
- lib/standup_md/file.rb Sun, 14 Jun 2020 22:01:32 -0500
14
- lib/standup_md/file/helpers.rb Sun, 14 Jun 2020 22:01:32 -0500
15
- lib/standup_md/version.rb Sun, 14 Jun 2020 22:01:32 -0500
5
+ lib/standup_md/cli/helpers.rb Tue, 23 Jun 2020 14:44:38 -0500
6
+ lib/standup_md/config.rb Wed, 17 Jun 2020 08:47:50 -0500
7
+ lib/standup_md/config/cli.rb Wed, 17 Jun 2020 08:47:50 -0500
8
+ lib/standup_md/config/entry.rb Wed, 17 Jun 2020 08:47:50 -0500
9
+ lib/standup_md/config/entry_list.rb Wed, 17 Jun 2020 08:47:50 -0500
10
+ lib/standup_md/config/file.rb Wed, 17 Jun 2020 08:47:50 -0500
11
+ lib/standup_md/entry.rb Tue, 23 Jun 2020 14:28:00 -0500
12
+ lib/standup_md/entry_list.rb Thu, 18 Jun 2020 23:08:53 -0500
13
+ lib/standup_md/file.rb Thu, 18 Jun 2020 23:09:53 -0500
14
+ lib/standup_md/file/helpers.rb Sun, 14 Jun 2020 22:06:09 -0500
15
+ lib/standup_md/version.rb Tue, 23 Jun 2020 14:45:34 -0500
@@ -148,6 +148,10 @@
148
148
  <ul><li>
149
149
  <p><a href="#api-examples">API Examples</a></p>
150
150
  </li><li>
151
+ <p><a href="#adding-an-entry-for-today">Adding an entry for today</a></p>
152
+ </li><li>
153
+ <p><a href="#finding-a-past-entry">Finding a past entry</a></p>
154
+ </li><li>
151
155
  <p><a href="https://evanthegrayt.github.io/standup_md/doc/index.html">Documentation</a></p>
152
156
  </li></ul>
153
157
  </li><li>
@@ -164,6 +168,8 @@
164
168
 
165
169
  <h2 id="label-Installation">Installation<span><a href="#label-Installation">&para;</a> <a href="#top">&uarr;</a></span></h2>
166
170
 
171
+ <p>If you don&#39;t have the permissions to install system-wide gems, you&#39;re probabaly also running an older version of ruby. I recommend installing <a href="https://github.com/rbenv/rbenv#installation">rbenv</a>, and then installing an up-to-date version of ruby.</p>
172
+
167
173
  <h3 id="label-Via+RubyGems">Via RubyGems<span><a href="#label-Via+RubyGems">&para;</a> <a href="#top">&uarr;</a></span></h3>
168
174
 
169
175
  <p>Just install the gem!</p>
@@ -252,6 +258,8 @@ rake install
252
258
 
253
259
  <h4 id="label-Available+Config+File+Options+and+Defaults">Available Config File Options and Defaults<span><a href="#label-Available+Config+File+Options+and+Defaults">&para;</a> <a href="#top">&uarr;</a></span></h4>
254
260
 
261
+ <p>For command-line usage, this file needs to be named <code>~/.standuprc</code>. To use in a rails project, create an initializer (<code>config/initializers/standup_md.rb</code>).</p>
262
+
255
263
  <pre class="ruby"><span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">configure</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
256
264
  <span class="ruby-comment"># Defaults for how the file is formatted.</span>
257
265
  <span class="ruby-comment"># See https://evanthegrayt.github.io/standup_md/doc/StandupMD/Config/Cli.html</span>
@@ -288,25 +296,11 @@ rake install
288
296
  <span class="ruby-keyword">end</span>
289
297
  </pre>
290
298
 
291
- <h4 id="label-Executable+Flags">Executable Flags<span><a href="#label-Executable+Flags">&para;</a> <a href="#top">&uarr;</a></span></h4>
299
+ <p>Any options not set in this file will retain their default values. Note that if you change <code>file_name_format</code>, and don&#39;t use a month or year, there will only ever be one standup file. This could cause issues long-term, as the files will get large over time and possibly cause performance issues.</p>
292
300
 
293
- <pre>--current ARRAY List of current entry&#39;s tasks
294
- --previous ARRAY List of precious entry&#39;s tasks
295
- --impediments ARRAY List of impediments for current entry
296
- --notes ARRAY List of notes for current entry
297
- --sub-header-order ARRAY The order of the sub-headers when writing the file
298
- -f, --file-name-format STRING Date-formattable string to use for standup file name
299
- -E, --editor EDITOR Editor to use for opening standup files
300
- -d, --directory DIRECTORY The directories where standup files are located
301
- -w --[no-]write Write current entry if it doesn&#39;t exist. Default is true
302
- -a --[no-]auto-fill-previous Auto-generate &#39;previous&#39; tasks for new entries
303
- -e --[no-]edit Open the file in the editor. Default is true
304
- -v, --[no-]verbose Verbose output. Default is false.
305
- -p, --print [DATE] Print current entry.
306
- If DATE is passed, will print entry for DATE, if it exists.
307
- DATE must be in the same format as file-name-format</pre>
301
+ <h4 id="label-Executable+Flags">Executable Flags<span><a href="#label-Executable+Flags">&para;</a> <a href="#top">&uarr;</a></span></h4>
308
302
 
309
- <p>Any options not set in this file will retain their default values. Note that if you change <code>file_name_format</code>, and don&#39;t use a month or year, there will only ever be one standup file. This could cause issues long-term, as the files will get large over time and possibly cause performance issues.</p>
303
+ <p>Some of these options can be changed at runtime. They are as follows. <code> --current ARRAY List of current entry&#39;s tasks --previous ARRAY List of precious entry&#39;s tasks --impediments ARRAY List of impediments for current entry --notes ARRAY List of notes for current entry --sub-header-order ARRAY The order of the sub-headers when writing the file -f, --file-name-format STRING Date-formattable string to use for standup file name -E, --editor EDITOR Editor to use for opening standup files -d, --directory DIRECTORY The directories where standup files are located -w --[no-]write Write current entry if it doesn&#39;t exist. Default is true -a --[no-]auto-fill-previous Auto-generate &#39;previous&#39; tasks for new entries -e --[no-]edit Open the file in the editor. Default is true -v, --[no-]verbose Verbose output. Default is false. -p, --print [DATE] Print current entry. If DATE is passed, will print entry for DATE, if it exists. DATE must be in the same format as file-name-format </code></p>
310
304
 
311
305
  <h4 id="label-Using+Existing+Standup+Files">Using Existing Standup Files<span><a href="#label-Using+Existing+Standup+Files">&para;</a> <a href="#top">&uarr;</a></span></h4>
312
306
 
@@ -358,6 +352,8 @@ rake install
358
352
 
359
353
  <h3 id="label-API+Examples">API Examples<span><a href="#label-API+Examples">&para;</a> <a href="#top">&uarr;</a></span></h3>
360
354
 
355
+ <h4 id="label-Adding+an+entry+for+today">Adding an entry for today<span><a href="#label-Adding+an+entry+for+today">&para;</a> <a href="#top">&uarr;</a></span></h4>
356
+
361
357
  <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;standup_md&#39;</span>
362
358
 
363
359
  <span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">configure</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
@@ -382,6 +378,15 @@ rake install
382
378
  <span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">find_by_date</span>(<span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>).<span class="ruby-identifier">load</span>.<span class="ruby-identifier">write</span>
383
379
  </pre>
384
380
 
381
+ <h4 id="label-Finding+a+past+entry">Finding a past entry<span><a href="#label-Finding+a+past+entry">&para;</a> <a href="#top">&uarr;</a></span></h4>
382
+
383
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;standup_md&#39;</span>
384
+
385
+ <span class="ruby-identifier">date</span> = <span class="ruby-constant">Date</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">2020</span>, <span class="ruby-value">04</span>, <span class="ruby-value">15</span>)
386
+ <span class="ruby-identifier">file</span> = <span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">find_by_date</span>(<span class="ruby-identifier">date</span>).<span class="ruby-identifier">load</span>
387
+ <span class="ruby-identifier">entry</span> = <span class="ruby-identifier">file</span>.<span class="ruby-identifier">entries</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">date</span>)
388
+ </pre>
389
+
385
390
  <h2 id="label-Reporting+Bugs+and+Requesting+Features">Reporting Bugs and Requesting Features<span><a href="#label-Reporting+Bugs+and+Requesting+Features">&para;</a> <a href="#top">&uarr;</a></span></h2>
386
391
 
387
392
  <p>If you have an idea or find a bug, please <a href="https://github.com/evanthegrayt/standup_md/issues/new">create an issue</a>. Just make sure the topic doesn&#39;t already exist. Better yet, you can always submit a Pull Request.</p>
@@ -1 +1 @@
1
- var search_data = {"index":{"searchIndex":["standupmd","cli","helpers","config","cli","entry","entrylist","file","entry","entrylist","file","<<()","<=>()","bullet_character=()","config()","config()","config()","config()","config()","config_file_loaded?()","configure()","create()","directory=()","each()","echo()","echo()","edit()","empty?()","execute()","exist?()","filter()","filter!()","find()","find()","find_by_date()","first()","header_depth=()","initalize()","last()","load()","load()","load_config_file()","load_preferences()","loaded?()","new()","new()","new()","new()","new()","new()","new()","new()","new?()","preference_file_loaded?()","print()","reset()","reset()","reset()","reset()","reset_config()","size()","sort()","sort!()","sort_reverse()","sub_header_depth=()","to_h()","to_h()","to_json()","to_json()","write()","write_file()","readme"],"longSearchIndex":["standupmd","standupmd::cli","standupmd::cli::helpers","standupmd::config","standupmd::config::cli","standupmd::config::entry","standupmd::config::entrylist","standupmd::config::file","standupmd::entry","standupmd::entrylist","standupmd::file","standupmd::entrylist#<<()","standupmd::entry#<=>()","standupmd::config::file#bullet_character=()","standupmd::config()","standupmd::cli::config()","standupmd::entry::config()","standupmd::entrylist::config()","standupmd::file::config()","standupmd::config_file_loaded?()","standupmd::configure()","standupmd::entry::create()","standupmd::config::file#directory=()","standupmd::entrylist#each()","standupmd::cli#echo()","standupmd::cli::echo()","standupmd::cli#edit()","standupmd::entrylist#empty?()","standupmd::cli::execute()","standupmd::file#exist?()","standupmd::entrylist#filter()","standupmd::entrylist#filter!()","standupmd::entrylist#find()","standupmd::file::find()","standupmd::file::find_by_date()","standupmd::entrylist#first()","standupmd::config::file#header_depth=()","standupmd::config::entrylist#initalize()","standupmd::entrylist#last()","standupmd::file::load()","standupmd::file#load()","standupmd::load_config_file()","standupmd::cli#load_preferences()","standupmd::file#loaded?()","standupmd::cli::new()","standupmd::config::new()","standupmd::config::cli::new()","standupmd::config::entry::new()","standupmd::config::file::new()","standupmd::entry::new()","standupmd::entrylist::new()","standupmd::file::new()","standupmd::file#new?()","standupmd::cli#preference_file_loaded?()","standupmd::cli::helpers#print()","standupmd::config::cli#reset()","standupmd::config::entry#reset()","standupmd::config::entrylist#reset()","standupmd::config::file#reset()","standupmd::reset_config()","standupmd::entrylist#size()","standupmd::entrylist#sort()","standupmd::entrylist#sort!()","standupmd::entrylist#sort_reverse()","standupmd::config::file#sub_header_depth=()","standupmd::entry#to_h()","standupmd::entrylist#to_h()","standupmd::entry#to_json()","standupmd::entrylist#to_json()","standupmd::file#write()","standupmd::cli#write_file()",""],"info":[["StandupMD","","StandupMD.html","","

The main module for the gem. Provides access to configuration classes.\n"],["StandupMD::Cli","","StandupMD/Cli.html","","

Class for handing the command-line interface.\n"],["StandupMD::Cli::Helpers","","StandupMD/Cli/Helpers.html","","

Module responsible for reading and writing standup files.\n"],["StandupMD::Config","","StandupMD/Config.html","","

This class provides a connector from StandupMD to the configuration classes.\n"],["StandupMD::Config::Cli","","StandupMD/Config/Cli.html","","

The configuration class for StandupMD::Cli\n"],["StandupMD::Config::Entry","","StandupMD/Config/Entry.html","","

The configuration class for StandupMD::Entry\n"],["StandupMD::Config::EntryList","","StandupMD/Config/EntryList.html","","

The configuration class for StandupMD::EntryList\n"],["StandupMD::Config::File","","StandupMD/Config/File.html","","

The configuration class for StandupMD::File\n"],["StandupMD::Entry","","StandupMD/Entry.html","","

Class for handling single entries. Includes the comparable module, and compares by date.\n"],["StandupMD::EntryList","","StandupMD/EntryList.html","","

Enumerable list of entries.\n"],["StandupMD::File","","StandupMD/File.html","","

Class for handling reading and writing standup files.\n"],["<<","StandupMD::EntryList","StandupMD/EntryList.html#method-i-3C-3C","(entry)","

Appends entries to list.\n

@param [StandupMD::Entry] entry\n

@return [Array]\n"],["<=>","StandupMD::Entry","StandupMD/Entry.html#method-i-3C-3D-3E","(other)","

Sorting method for Comparable. Entries are compared by date.\n"],["bullet_character=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-bullet_character-3D","(char)","

Setter for bullet_character. Must be * (asterisk) or - (dash).\n

@param [String] character\n

@return [String] …\n"],["config","StandupMD","StandupMD.html#method-c-config","()","

Method for accessing the configuration.\n

@return [StanupMD::Cli]\n"],["config","StandupMD::Cli","StandupMD/Cli.html#method-c-config","()","

Access to the class's configuration.\n

@return [StandupMD::Config::Cli]\n"],["config","StandupMD::Entry","StandupMD/Entry.html#method-c-config","()","

Access to the class's configuration.\n

@return [StandupMD::Config::Entry]\n"],["config","StandupMD::EntryList","StandupMD/EntryList.html#method-c-config","()","

Access to the class's configuration.\n

@return [StandupMD::Config::EntryList]\n"],["config","StandupMD::File","StandupMD/File.html#method-c-config","()","

Access to the class's configuration.\n

@return [StandupMD::Config::EntryList]\n"],["config_file_loaded?","StandupMD","StandupMD.html#method-c-config_file_loaded-3F","()","

Has a config file been loaded?\n

@return [Boolean]\n"],["configure","StandupMD","StandupMD.html#method-c-configure","()","

Allows for configuration via a block. Useful when making config files.\n

@example\n\n

StandupMD.configure { |s| ...
\n"],["create","StandupMD::Entry","StandupMD/Entry.html#method-c-create","()","

Creates a generic entry. Default values can be set via configuration. Yields the entry if a block is …\n"],["directory=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-directory-3D","(directory)","

Setter for directory. Must be expanded in case the user uses `~` for home. If the directory doesn't …\n"],["each","StandupMD::EntryList","StandupMD/EntryList.html#method-i-each","(&block)","

Iterate over the list and yield each entry.\n"],["echo","StandupMD::Cli","StandupMD/Cli.html#method-i-echo","(msg)","

Quick access to Cli.echo.\n

@return [nil]\n"],["echo","StandupMD::Cli","StandupMD/Cli.html#method-c-echo","(msg)","

Prints output if verbose is true.\n

@return [nil]\n"],["edit","StandupMD::Cli","StandupMD/Cli.html#method-i-edit","()","

Opens the file in an editor. Abandons the script.\n

@return [nil]\n"],["empty?","StandupMD::EntryList","StandupMD/EntryList.html#method-i-empty-3F","()","

Is the list empty?\n

@return [Boolean] true if empty\n"],["execute","StandupMD::Cli","StandupMD/Cli.html#method-c-execute","(options = [])","

Creates an instance of StandupMD and runs what the user requested.\n"],["exist?","StandupMD::File","StandupMD/File.html#method-i-exist-3F","()","

Does the file exist?\n

@return [Boolean] true if exists\n"],["filter","StandupMD::EntryList","StandupMD/EntryList.html#method-i-filter","(start_date, end_date)","

Returns entries that are between the start and end date. This method assumes the list has already been …\n"],["filter!","StandupMD::EntryList","StandupMD/EntryList.html#method-i-filter-21","(start_date, end_date)","

Replaces entries with results of filter.\n

@param [Date] start_date\n

@param [Date] end_date\n"],["find","StandupMD::EntryList","StandupMD/EntryList.html#method-i-find","(key)","

Finds an entry based on date. This method assumes the list has already been sorted.\n"],["find","StandupMD::File","StandupMD/File.html#method-c-find","(file_name)","

Find standup file in directory by file name.\n

@param [String] File_naem\n"],["find_by_date","StandupMD::File","StandupMD/File.html#method-c-find_by_date","(date)","

Find standup file in directory by Date object.\n

@param [Date] date\n"],["first","StandupMD::EntryList","StandupMD/EntryList.html#method-i-first","()","

The first entry in the list. This method assumes the list has already been sorted.\n

@return [StandupMD::Entry] …\n"],["header_depth=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-header_depth-3D","(depth)","

Number of octothorps (#) to use before the main header.\n

@param [Integer] depth\n

@return [Integer]\n"],["initalize","StandupMD::Config::EntryList","StandupMD/Config/EntryList.html#method-i-initalize","()","

Initializes the config with default values.\n"],["last","StandupMD::EntryList","StandupMD/EntryList.html#method-i-last","()","

The last entry in the list. This method assumes the list has already been sorted.\n

@return [StandupMD::Entry] …\n"],["load","StandupMD::File","StandupMD/File.html#method-c-load","(file_name)","

Convenience method for calling File.find(file_name).load\n

@param [String] file_name\n

@return [StandupMD::File] …\n"],["load","StandupMD::File","StandupMD/File.html#method-i-load","()","

Loads the file's contents. TODO clean up this method.\n

@return [StandupMD::FileList]\n"],["load_config_file","StandupMD","StandupMD.html#method-c-load_config_file","(file)","

Loads a config file.\n

@param [String] file\n"],["load_preferences","StandupMD::Cli","StandupMD/Cli.html#method-i-load_preferences","()","

Load the preference file.\n

@return [nil]\n"],["loaded?","StandupMD::File","StandupMD/File.html#method-i-loaded-3F","()","

Has the file been loaded?\n

@return [Boolean] true if loaded\n"],["new","StandupMD::Cli","StandupMD/Cli.html#method-c-new","(options = [], load_config = true)","

Constructor. Sets defaults.\n

@param [Array] options\n"],["new","StandupMD::Config","StandupMD/Config.html#method-c-new","()","

Builds the links to the configuration classes.\n"],["new","StandupMD::Config::Cli","StandupMD/Config/Cli.html#method-c-new","()","

Initializes the config with default values.\n"],["new","StandupMD::Config::Entry","StandupMD/Config/Entry.html#method-c-new","()","

Initializes the config with default values.\n"],["new","StandupMD::Config::File","StandupMD/Config/File.html#method-c-new","()","

Initializes the config with default values.\n"],["new","StandupMD::Entry","StandupMD/Entry.html#method-c-new","(date, current, previous, impediments, notes = [])","

Constructs instance of StandupMD::Entry.\n

@param [Date] date\n

@param [Array] current\n"],["new","StandupMD::EntryList","StandupMD/EntryList.html#method-c-new","(*entries)","

Contruct a list. Can pass any amount of StandupMD::Entry instances.\n

@param [Entry] entries\n

@return [StandupMD::EntryList] …\n"],["new","StandupMD::File","StandupMD/File.html#method-c-new","(file_name)","

Constructs the instance.\n

@param [String] file_name\n

@return [StandupMP::File]\n"],["new?","StandupMD::File","StandupMD/File.html#method-i-new-3F","()","

Was the file just now created?\n

@return [Boolean] true if new\n"],["preference_file_loaded?","StandupMD::Cli","StandupMD/Cli.html#method-i-preference_file_loaded-3F","()","

Has the preference file been loaded?\n

@return boolean\n"],["print","StandupMD::Cli::Helpers","StandupMD/Cli/Helpers.html#method-i-print","(entry)","

Print an entry to the command line.\n

@param [StandupMD::Entry] entry\n

@return [nil]\n"],["reset","StandupMD::Config::Cli","StandupMD/Config/Cli.html#method-i-reset","()","

Sets all config values back to their defaults.\n

@return [Hash]\n"],["reset","StandupMD::Config::Entry","StandupMD/Config/Entry.html#method-i-reset","()","

Sets all config values back to their defaults.\n

@return [Hash]\n"],["reset","StandupMD::Config::EntryList","StandupMD/Config/EntryList.html#method-i-reset","()","

Sets all config values back to their defaults.\n

@return [Hash]\n"],["reset","StandupMD::Config::File","StandupMD/Config/File.html#method-i-reset","()","

Sets all config values back to their defaults.\n

@return [Hash]\n"],["reset_config","StandupMD","StandupMD.html#method-c-reset_config","()","

Reset all configuration values to their defaults.\n

@return [StandupMD::Config]\n"],["size","StandupMD::EntryList","StandupMD/EntryList.html#method-i-size","()","

How many entries are in the list.\n

@return [Integer]\n"],["sort","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort","()","

Returns a copy of self sorted by date.\n

@return [StandupMD::EntryList]\n"],["sort!","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort-21","()","

Replace entries with sorted entries by date.\n

@return [StandupMD::EntryList]\n"],["sort_reverse","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort_reverse","()","

Returns a copy of self sorted by date.\n

@return [StandupMD::EntryList]\n"],["sub_header_depth=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-sub_header_depth-3D","(depth)","

Number of octothorps (#) to use before sub headers (Current, Previous, etc).\n

@param [Integer] depth\n

@return …\n"],["to_h","StandupMD::Entry","StandupMD/Entry.html#method-i-to_h","()","

Entry as a hash .\n

@return [Hash]\n"],["to_h","StandupMD::EntryList","StandupMD/EntryList.html#method-i-to_h","()","

The list as a hash, with the dates as keys.\n

@return [Hash]\n"],["to_json","StandupMD::Entry","StandupMD/Entry.html#method-i-to_json","()","

Entry as a json object.\n

@return [String]\n"],["to_json","StandupMD::EntryList","StandupMD/EntryList.html#method-i-to_json","()","

The entry list as a json object.\n

@return [String]\n"],["write","StandupMD::File","StandupMD/File.html#method-i-write","(dates = {})","

Writes a new entry to the file if the first entry in the file isn't today. This method is destructive; …\n"],["write_file","StandupMD::Cli","StandupMD/Cli.html#method-i-write_file","()","

Writes entries to the file.\n

@return [Boolean] true if file was written\n"],["README","","README_md.html","","

The Standup Doctor\n

…\n\n

"]]}}
1
+ var search_data = {"index":{"searchIndex":["standupmd","cli","helpers","config","cli","entry","entrylist","file","entry","entrylist","file","<<()","<=>()","@entries()","bullet_character=()","config()","config()","config()","config()","config()","config_file_loaded?()","configure()","create()","directory=()","echo()","echo()","edit()","execute()","exist?()","filter()","filter!()","find()","find()","find_by_date()","header_depth=()","initalize()","load()","load()","load_config_file()","load_preferences()","loaded?()","new()","new()","new()","new()","new()","new()","new()","new()","new?()","preference_file_loaded?()","print()","reset()","reset()","reset()","reset()","reset_config()","sort()","sort!()","sort_reverse()","sub_header_depth=()","to_h()","to_h()","to_json()","to_json()","write()","write_file()","readme"],"longSearchIndex":["standupmd","standupmd::cli","standupmd::cli::helpers","standupmd::config","standupmd::config::cli","standupmd::config::entry","standupmd::config::entrylist","standupmd::config::file","standupmd::entry","standupmd::entrylist","standupmd::file","standupmd::entrylist#<<()","standupmd::entry#<=>()","standupmd::entrylist#@entries()","standupmd::config::file#bullet_character=()","standupmd::config()","standupmd::cli::config()","standupmd::entry::config()","standupmd::entrylist::config()","standupmd::file::config()","standupmd::config_file_loaded?()","standupmd::configure()","standupmd::entry::create()","standupmd::config::file#directory=()","standupmd::cli#echo()","standupmd::cli::echo()","standupmd::cli#edit()","standupmd::cli::execute()","standupmd::file#exist?()","standupmd::entrylist#filter()","standupmd::entrylist#filter!()","standupmd::entrylist#find()","standupmd::file::find()","standupmd::file::find_by_date()","standupmd::config::file#header_depth=()","standupmd::config::entrylist#initalize()","standupmd::file::load()","standupmd::file#load()","standupmd::load_config_file()","standupmd::cli#load_preferences()","standupmd::file#loaded?()","standupmd::cli::new()","standupmd::config::new()","standupmd::config::cli::new()","standupmd::config::entry::new()","standupmd::config::file::new()","standupmd::entry::new()","standupmd::entrylist::new()","standupmd::file::new()","standupmd::file#new?()","standupmd::cli#preference_file_loaded?()","standupmd::cli::helpers#print()","standupmd::config::cli#reset()","standupmd::config::entry#reset()","standupmd::config::entrylist#reset()","standupmd::config::file#reset()","standupmd::reset_config()","standupmd::entrylist#sort()","standupmd::entrylist#sort!()","standupmd::entrylist#sort_reverse()","standupmd::config::file#sub_header_depth=()","standupmd::entry#to_h()","standupmd::entrylist#to_h()","standupmd::entry#to_json()","standupmd::entrylist#to_json()","standupmd::file#write()","standupmd::cli#write_file()",""],"info":[["StandupMD","","StandupMD.html","","

The main module for the gem. Provides access to configuration classes.\n"],["StandupMD::Cli","","StandupMD/Cli.html","","

Class for handing the command-line interface.\n"],["StandupMD::Cli::Helpers","","StandupMD/Cli/Helpers.html","","

Module responsible for reading and writing standup files.\n"],["StandupMD::Config","","StandupMD/Config.html","","

This class provides a connector from StandupMD to the configuration classes.\n"],["StandupMD::Config::Cli","","StandupMD/Config/Cli.html","","

The configuration class for StandupMD::Cli\n"],["StandupMD::Config::Entry","","StandupMD/Config/Entry.html","","

The configuration class for StandupMD::Entry\n"],["StandupMD::Config::EntryList","","StandupMD/Config/EntryList.html","","

The configuration class for StandupMD::EntryList\n"],["StandupMD::Config::File","","StandupMD/Config/File.html","","

The configuration class for StandupMD::File\n"],["StandupMD::Entry","","StandupMD/Entry.html","","

Class for handling single entries. Includes the comparable module, and compares by date.\n"],["StandupMD::EntryList","","StandupMD/EntryList.html","","

Enumerable list of entries.\n"],["StandupMD::File","","StandupMD/File.html","","

Class for handling reading and writing standup files.\n"],["<<","StandupMD::EntryList","StandupMD/EntryList.html#method-i-3C-3C","(entry)","

Appends entries to list.\n

@param [StandupMD::Entry] entry\n

@return [Array]\n"],["<=>","StandupMD::Entry","StandupMD/Entry.html#method-i-3C-3D-3E","(other)","

Sorting method for Comparable. Entries are compared by date.\n"],["@entries","StandupMD::EntryList","StandupMD/EntryList.html#method-i-40entries","","

The following are forwarded to @entries, which is the underly array of entries.\n

each — Iterate over each …\n"],["bullet_character=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-bullet_character-3D","(char)","

Setter for bullet_character. Must be * (asterisk) or - (dash).\n

@param [String] character\n

@return [String] …\n"],["config","StandupMD","StandupMD.html#method-c-config","()","

Method for accessing the configuration.\n

@return [StanupMD::Cli]\n"],["config","StandupMD::Cli","StandupMD/Cli.html#method-c-config","()","

Access to the class's configuration.\n

@return [StandupMD::Config::Cli]\n"],["config","StandupMD::Entry","StandupMD/Entry.html#method-c-config","()","

Access to the class's configuration.\n

@return [StandupMD::Config::Entry]\n"],["config","StandupMD::EntryList","StandupMD/EntryList.html#method-c-config","()","

Access to the class's configuration.\n

@return [StandupMD::Config::EntryList]\n"],["config","StandupMD::File","StandupMD/File.html#method-c-config","()","

Access to the class's configuration.\n

@return [StandupMD::Config::EntryList]\n"],["config_file_loaded?","StandupMD","StandupMD.html#method-c-config_file_loaded-3F","()","

Has a config file been loaded?\n

@return [Boolean]\n"],["configure","StandupMD","StandupMD.html#method-c-configure","()","

Allows for configuration via a block. Useful when making config files.\n

@example\n\n

StandupMD.configure { |s| ...
\n"],["create","StandupMD::Entry","StandupMD/Entry.html#method-c-create","()","

Creates a generic entry. Default values can be set via configuration. Yields the entry if a block is …\n"],["directory=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-directory-3D","(directory)","

Setter for directory. Must be expanded in case the user uses `~` for home. If the directory doesn't …\n"],["echo","StandupMD::Cli","StandupMD/Cli.html#method-i-echo","(msg)","

Quick access to Cli.echo.\n

@return [nil]\n"],["echo","StandupMD::Cli","StandupMD/Cli.html#method-c-echo","(msg)","

Prints output if verbose is true.\n

@return [nil]\n"],["edit","StandupMD::Cli","StandupMD/Cli.html#method-i-edit","()","

Opens the file in an editor. Abandons the script.\n

@return [nil]\n"],["execute","StandupMD::Cli","StandupMD/Cli.html#method-c-execute","(options = [])","

Creates an instance of StandupMD and runs what the user requested.\n"],["exist?","StandupMD::File","StandupMD/File.html#method-i-exist-3F","()","

Does the file exist?\n

@return [Boolean] true if exists\n"],["filter","StandupMD::EntryList","StandupMD/EntryList.html#method-i-filter","(start_date, end_date)","

Returns entries that are between the start and end date. This method assumes the list has already been …\n"],["filter!","StandupMD::EntryList","StandupMD/EntryList.html#method-i-filter-21","(start_date, end_date)","

Replaces entries with results of filter.\n

@param [Date] start_date\n

@param [Date] end_date\n"],["find","StandupMD::EntryList","StandupMD/EntryList.html#method-i-find","(date)","

Finds an entry based on date. This method assumes the list has already been sorted.\n

@param [Date] date …\n"],["find","StandupMD::File","StandupMD/File.html#method-c-find","(file_name)","

Find standup file in directory by file name.\n

@param [String] File_naem\n"],["find_by_date","StandupMD::File","StandupMD/File.html#method-c-find_by_date","(date)","

Find standup file in directory by Date object.\n

@param [Date] date\n"],["header_depth=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-header_depth-3D","(depth)","

Number of octothorps (#) to use before the main header.\n

@param [Integer] depth\n

@return [Integer]\n"],["initalize","StandupMD::Config::EntryList","StandupMD/Config/EntryList.html#method-i-initalize","()","

Initializes the config with default values.\n"],["load","StandupMD::File","StandupMD/File.html#method-c-load","(file_name)","

Convenience method for calling File.find(file_name).load\n

@param [String] file_name\n

@return [StandupMD::File] …\n"],["load","StandupMD::File","StandupMD/File.html#method-i-load","()","

Loads the file's contents. TODO clean up this method.\n

@return [StandupMD::FileList]\n"],["load_config_file","StandupMD","StandupMD.html#method-c-load_config_file","(file)","

Loads a config file.\n

@param [String] file\n"],["load_preferences","StandupMD::Cli","StandupMD/Cli.html#method-i-load_preferences","()","

Load the preference file.\n

@return [nil]\n"],["loaded?","StandupMD::File","StandupMD/File.html#method-i-loaded-3F","()","

Has the file been loaded?\n

@return [Boolean] true if loaded\n"],["new","StandupMD::Cli","StandupMD/Cli.html#method-c-new","(options = [], load_config = true)","

Constructor. Sets defaults.\n

@param [Array] options\n"],["new","StandupMD::Config","StandupMD/Config.html#method-c-new","()","

Builds the links to the configuration classes.\n"],["new","StandupMD::Config::Cli","StandupMD/Config/Cli.html#method-c-new","()","

Initializes the config with default values.\n"],["new","StandupMD::Config::Entry","StandupMD/Config/Entry.html#method-c-new","()","

Initializes the config with default values.\n"],["new","StandupMD::Config::File","StandupMD/Config/File.html#method-c-new","()","

Initializes the config with default values.\n"],["new","StandupMD::Entry","StandupMD/Entry.html#method-c-new","(date, current, previous, impediments, notes = [])","

Constructs instance of StandupMD::Entry.\n

@param [Date] date\n

@param [Array] current\n"],["new","StandupMD::EntryList","StandupMD/EntryList.html#method-c-new","(*entries)","

Contruct a list. Can pass any amount of StandupMD::Entry instances.\n

@param [Entry] entries\n

@return [StandupMD::EntryList] …\n"],["new","StandupMD::File","StandupMD/File.html#method-c-new","(file_name)","

Constructs the instance.\n

@param [String] file_name\n

@return [StandupMP::File]\n"],["new?","StandupMD::File","StandupMD/File.html#method-i-new-3F","()","

Was the file just now created?\n

@return [Boolean] true if new\n"],["preference_file_loaded?","StandupMD::Cli","StandupMD/Cli.html#method-i-preference_file_loaded-3F","()","

Has the preference file been loaded?\n

@return boolean\n"],["print","StandupMD::Cli::Helpers","StandupMD/Cli/Helpers.html#method-i-print","(entry)","

Print an entry to the command line.\n

@param [StandupMD::Entry] entry\n

@return [nil]\n"],["reset","StandupMD::Config::Cli","StandupMD/Config/Cli.html#method-i-reset","()","

Sets all config values back to their defaults.\n

@return [Hash]\n"],["reset","StandupMD::Config::Entry","StandupMD/Config/Entry.html#method-i-reset","()","

Sets all config values back to their defaults.\n

@return [Hash]\n"],["reset","StandupMD::Config::EntryList","StandupMD/Config/EntryList.html#method-i-reset","()","

Sets all config values back to their defaults.\n

@return [Hash]\n"],["reset","StandupMD::Config::File","StandupMD/Config/File.html#method-i-reset","()","

Sets all config values back to their defaults.\n

@return [Hash]\n"],["reset_config","StandupMD","StandupMD.html#method-c-reset_config","()","

Reset all configuration values to their defaults.\n

@return [StandupMD::Config]\n"],["sort","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort","()","

Returns a copy of self sorted by date.\n

@return [StandupMD::EntryList]\n"],["sort!","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort-21","()","

Replace entries with sorted entries by date.\n

@return [StandupMD::EntryList]\n"],["sort_reverse","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort_reverse","()","

Returns a copy of self sorted by date.\n

@return [StandupMD::EntryList]\n"],["sub_header_depth=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-sub_header_depth-3D","(depth)","

Number of octothorps (#) to use before sub headers (Current, Previous, etc).\n

@param [Integer] depth\n

@return …\n"],["to_h","StandupMD::Entry","StandupMD/Entry.html#method-i-to_h","()","

Entry as a hash .\n

@return [Hash]\n"],["to_h","StandupMD::EntryList","StandupMD/EntryList.html#method-i-to_h","()","

The list as a hash, with the dates as keys.\n

@return [Hash]\n"],["to_json","StandupMD::Entry","StandupMD/Entry.html#method-i-to_json","()","

Entry as a json object.\n

@return [String]\n"],["to_json","StandupMD::EntryList","StandupMD/EntryList.html#method-i-to_json","()","

The entry list as a json object.\n

@return [String]\n"],["write","StandupMD::File","StandupMD/File.html#method-i-write","(dates = {})","

Writes a new entry to the file if the first entry in the file isn't today. This method is destructive; …\n"],["write_file","StandupMD::Cli","StandupMD/Cli.html#method-i-write_file","()","

Writes entries to the file.\n

@return [Boolean] true if file was written\n"],["README","","README_md.html","","

The Standup Doctor\n

…\n\n

"]]}}
Binary file
@@ -75,6 +75,10 @@
75
75
 
76
76
  <li><a href="README_md.html#label-API+Examples">API Examples</a>
77
77
 
78
+ <li><a href="README_md.html#label-Adding+an+entry+for+today">Adding an entry for today</a>
79
+
80
+ <li><a href="README_md.html#label-Finding+a+past+entry">Finding a past entry</a>
81
+
78
82
  <li><a href="README_md.html#label-Reporting+Bugs+and+Requesting+Features">Reporting Bugs and Requesting Features</a>
79
83
 
80
84
  <li><a href="README_md.html#label-Self-Promotion">Self-Promotion</a>
@@ -137,6 +141,14 @@
137
141
  <li class="class">
138
142
  <a href="StandupMD/EntryList.html">StandupMD::EntryList</a>
139
143
 
144
+ <ul>
145
+
146
+ <li><a href="StandupMD/EntryList.html#5Buntitled-5D">Top Section</a>
147
+
148
+ <li><a href="StandupMD/EntryList.html#Delegators">Delegators</a>
149
+
150
+ </ul>
151
+
140
152
  </li>
141
153
 
142
154
  <li class="class">
@@ -149,16 +161,6 @@
149
161
  <h2 id="methods">Methods</h2>
150
162
  <ul>
151
163
 
152
- <li class="method">
153
- <a href="StandupMD/Cli.html#method-c-config">::config</a>
154
- &mdash;
155
- <span class="container">StandupMD::Cli</span>
156
-
157
- <li class="method">
158
- <a href="StandupMD/File.html#method-c-config">::config</a>
159
- &mdash;
160
- <span class="container">StandupMD::File</span>
161
-
162
164
  <li class="method">
163
165
  <a href="StandupMD/Entry.html#method-c-config">::config</a>
164
166
  &mdash;
@@ -169,11 +171,21 @@
169
171
  &mdash;
170
172
  <span class="container">StandupMD::EntryList</span>
171
173
 
174
+ <li class="method">
175
+ <a href="StandupMD/Cli.html#method-c-config">::config</a>
176
+ &mdash;
177
+ <span class="container">StandupMD::Cli</span>
178
+
172
179
  <li class="method">
173
180
  <a href="StandupMD.html#method-c-config">::config</a>
174
181
  &mdash;
175
182
  <span class="container">StandupMD</span>
176
183
 
184
+ <li class="method">
185
+ <a href="StandupMD/File.html#method-c-config">::config</a>
186
+ &mdash;
187
+ <span class="container">StandupMD::File</span>
188
+
177
189
  <li class="method">
178
190
  <a href="StandupMD.html#method-c-config_file_loaded-3F">::config_file_loaded?</a>
179
191
  &mdash;
@@ -225,9 +237,9 @@
225
237
  <span class="container">StandupMD::Config::File</span>
226
238
 
227
239
  <li class="method">
228
- <a href="StandupMD/Cli.html#method-c-new">::new</a>
240
+ <a href="StandupMD/File.html#method-c-new">::new</a>
229
241
  &mdash;
230
- <span class="container">StandupMD::Cli</span>
242
+ <span class="container">StandupMD::File</span>
231
243
 
232
244
  <li class="method">
233
245
  <a href="StandupMD/Config.html#method-c-new">::new</a>
@@ -235,29 +247,29 @@
235
247
  <span class="container">StandupMD::Config</span>
236
248
 
237
249
  <li class="method">
238
- <a href="StandupMD/Config/Cli.html#method-c-new">::new</a>
250
+ <a href="StandupMD/Config/Entry.html#method-c-new">::new</a>
239
251
  &mdash;
240
- <span class="container">StandupMD::Config::Cli</span>
252
+ <span class="container">StandupMD::Config::Entry</span>
241
253
 
242
254
  <li class="method">
243
- <a href="StandupMD/Config/Entry.html#method-c-new">::new</a>
255
+ <a href="StandupMD/Cli.html#method-c-new">::new</a>
244
256
  &mdash;
245
- <span class="container">StandupMD::Config::Entry</span>
257
+ <span class="container">StandupMD::Cli</span>
246
258
 
247
259
  <li class="method">
248
- <a href="StandupMD/File.html#method-c-new">::new</a>
260
+ <a href="StandupMD/EntryList.html#method-c-new">::new</a>
249
261
  &mdash;
250
- <span class="container">StandupMD::File</span>
262
+ <span class="container">StandupMD::EntryList</span>
251
263
 
252
264
  <li class="method">
253
- <a href="StandupMD/Entry.html#method-c-new">::new</a>
265
+ <a href="StandupMD/Config/Cli.html#method-c-new">::new</a>
254
266
  &mdash;
255
- <span class="container">StandupMD::Entry</span>
267
+ <span class="container">StandupMD::Config::Cli</span>
256
268
 
257
269
  <li class="method">
258
- <a href="StandupMD/EntryList.html#method-c-new">::new</a>
270
+ <a href="StandupMD/Entry.html#method-c-new">::new</a>
259
271
  &mdash;
260
- <span class="container">StandupMD::EntryList</span>
272
+ <span class="container">StandupMD::Entry</span>
261
273
 
262
274
  <li class="method">
263
275
  <a href="StandupMD.html#method-c-reset_config">::reset_config</a>
@@ -275,19 +287,19 @@
275
287
  <span class="container">StandupMD::Entry</span>
276
288
 
277
289
  <li class="method">
278
- <a href="StandupMD/Config/File.html#method-i-bullet_character-3D">#bullet_character=</a>
290
+ <a href="StandupMD/EntryList.html#method-i-40entries">#@entries</a>
279
291
  &mdash;
280
- <span class="container">StandupMD::Config::File</span>
292
+ <span class="container">StandupMD::EntryList</span>
281
293
 
282
294
  <li class="method">
283
- <a href="StandupMD/Config/File.html#method-i-directory-3D">#directory=</a>
295
+ <a href="StandupMD/Config/File.html#method-i-bullet_character-3D">#bullet_character=</a>
284
296
  &mdash;
285
297
  <span class="container">StandupMD::Config::File</span>
286
298
 
287
299
  <li class="method">
288
- <a href="StandupMD/EntryList.html#method-i-each">#each</a>
300
+ <a href="StandupMD/Config/File.html#method-i-directory-3D">#directory=</a>
289
301
  &mdash;
290
- <span class="container">StandupMD::EntryList</span>
302
+ <span class="container">StandupMD::Config::File</span>
291
303
 
292
304
  <li class="method">
293
305
  <a href="StandupMD/Cli.html#method-i-echo">#echo</a>
@@ -299,11 +311,6 @@
299
311
  &mdash;
300
312
  <span class="container">StandupMD::Cli</span>
301
313
 
302
- <li class="method">
303
- <a href="StandupMD/EntryList.html#method-i-empty-3F">#empty?</a>
304
- &mdash;
305
- <span class="container">StandupMD::EntryList</span>
306
-
307
314
  <li class="method">
308
315
  <a href="StandupMD/File.html#method-i-exist-3F">#exist?</a>
309
316
  &mdash;
@@ -324,11 +331,6 @@
324
331
  &mdash;
325
332
  <span class="container">StandupMD::EntryList</span>
326
333
 
327
- <li class="method">
328
- <a href="StandupMD/EntryList.html#method-i-first">#first</a>
329
- &mdash;
330
- <span class="container">StandupMD::EntryList</span>
331
-
332
334
  <li class="method">
333
335
  <a href="StandupMD/Config/File.html#method-i-header_depth-3D">#header_depth=</a>
334
336
  &mdash;
@@ -339,11 +341,6 @@
339
341
  &mdash;
340
342
  <span class="container">StandupMD::Config::EntryList</span>
341
343
 
342
- <li class="method">
343
- <a href="StandupMD/EntryList.html#method-i-last">#last</a>
344
- &mdash;
345
- <span class="container">StandupMD::EntryList</span>
346
-
347
344
  <li class="method">
348
345
  <a href="StandupMD/File.html#method-i-load">#load</a>
349
346
  &mdash;
@@ -375,14 +372,9 @@
375
372
  <span class="container">StandupMD::Cli::Helpers</span>
376
373
 
377
374
  <li class="method">
378
- <a href="StandupMD/Config/EntryList.html#method-i-reset">#reset</a>
379
- &mdash;
380
- <span class="container">StandupMD::Config::EntryList</span>
381
-
382
- <li class="method">
383
- <a href="StandupMD/Config/Cli.html#method-i-reset">#reset</a>
375
+ <a href="StandupMD/Config/Entry.html#method-i-reset">#reset</a>
384
376
  &mdash;
385
- <span class="container">StandupMD::Config::Cli</span>
377
+ <span class="container">StandupMD::Config::Entry</span>
386
378
 
387
379
  <li class="method">
388
380
  <a href="StandupMD/Config/File.html#method-i-reset">#reset</a>
@@ -390,14 +382,14 @@
390
382
  <span class="container">StandupMD::Config::File</span>
391
383
 
392
384
  <li class="method">
393
- <a href="StandupMD/Config/Entry.html#method-i-reset">#reset</a>
385
+ <a href="StandupMD/Config/EntryList.html#method-i-reset">#reset</a>
394
386
  &mdash;
395
- <span class="container">StandupMD::Config::Entry</span>
387
+ <span class="container">StandupMD::Config::EntryList</span>
396
388
 
397
389
  <li class="method">
398
- <a href="StandupMD/EntryList.html#method-i-size">#size</a>
390
+ <a href="StandupMD/Config/Cli.html#method-i-reset">#reset</a>
399
391
  &mdash;
400
- <span class="container">StandupMD::EntryList</span>
392
+ <span class="container">StandupMD::Config::Cli</span>
401
393
 
402
394
  <li class="method">
403
395
  <a href="StandupMD/EntryList.html#method-i-sort">#sort</a>
@@ -420,14 +412,14 @@
420
412
  <span class="container">StandupMD::Config::File</span>
421
413
 
422
414
  <li class="method">
423
- <a href="StandupMD/EntryList.html#method-i-to_h">#to_h</a>
415
+ <a href="StandupMD/Entry.html#method-i-to_h">#to_h</a>
424
416
  &mdash;
425
- <span class="container">StandupMD::EntryList</span>
417
+ <span class="container">StandupMD::Entry</span>
426
418
 
427
419
  <li class="method">
428
- <a href="StandupMD/Entry.html#method-i-to_h">#to_h</a>
420
+ <a href="StandupMD/EntryList.html#method-i-to_h">#to_h</a>
429
421
  &mdash;
430
- <span class="container">StandupMD::Entry</span>
422
+ <span class="container">StandupMD::EntryList</span>
431
423
 
432
424
  <li class="method">
433
425
  <a href="StandupMD/EntryList.html#method-i-to_json">#to_json</a>
@@ -18,11 +18,11 @@ module StandupMD
18
18
  puts "No record found for #{StandupMD.config.cli.date}"
19
19
  return
20
20
  end
21
- puts '#' * StandupMD.config.file.header_depth + ' ' + entry.date.strftime(StandupMD.config.file.header_date_format)
22
- StandupMD.config.file.sub_header_order.each do |attr|
23
- tasks = entry.send(attr)
21
+ puts header(entry)
22
+ StandupMD.config.file.sub_header_order.each do |header_type|
23
+ tasks = entry.public_send(header_type)
24
24
  next if !tasks || tasks.empty?
25
- puts '#' * StandupMD.config.file.sub_header_depth + ' ' + StandupMD.config.file.send("#{attr}_header").capitalize
25
+ puts sub_header(header_type)
26
26
  tasks.each { |task| puts StandupMD.config.file.bullet_character + ' ' + task }
27
27
  end
28
28
  puts
@@ -162,6 +162,28 @@ module StandupMD
162
162
  def prev_file
163
163
  StandupMD::File.find_by_date(Date.today.prev_month)
164
164
  end
165
+
166
+ ##
167
+ # The header.
168
+ #
169
+ # @param [StandupMD::Entry] entry
170
+ #
171
+ # @return [String]
172
+ def header(entry)
173
+ '#' * StandupMD.config.file.header_depth + ' ' +
174
+ entry.date.strftime(StandupMD.config.file.header_date_format)
175
+ end
176
+
177
+ ##
178
+ # The sub-header.
179
+ #
180
+ # @param [String] header_type
181
+ #
182
+ # @return [String]
183
+ def sub_header(header_type)
184
+ '#' * StandupMD.config.file.sub_header_depth + ' ' +
185
+ StandupMD.config.file.public_send("#{header_type}_header").capitalize
186
+ end
165
187
  end
166
188
  end
167
189
  end
@@ -39,7 +39,7 @@ module StandupMD
39
39
  attr_accessor :previous
40
40
 
41
41
  ##
42
- # Iimpediments for this entry.
42
+ # Impediments for this entry.
43
43
  #
44
44
  # @return [Array]
45
45
  attr_accessor :impediments
@@ -1,10 +1,12 @@
1
1
  # frozen_string_literal: true
2
+ require 'forwardable'
2
3
 
3
4
  module StandupMD
4
5
 
5
6
  ##
6
7
  # Enumerable list of entries.
7
8
  class EntryList
9
+ extend Forwardable
8
10
  include Enumerable
9
11
 
10
12
  ##
@@ -29,12 +31,6 @@ module StandupMD
29
31
  @entries = entries
30
32
  end
31
33
 
32
- ##
33
- # Iterate over the list and yield each entry.
34
- def each(&block)
35
- @entries.each(&block)
36
- end
37
-
38
34
  ##
39
35
  # Appends entries to list.
40
36
  #
@@ -51,8 +47,12 @@ module StandupMD
51
47
  ##
52
48
  # Finds an entry based on date. This method assumes the list has already
53
49
  # been sorted.
54
- def find(key)
55
- to_a.bsearch { |e| e.date == key }
50
+ #
51
+ # @param [Date] date
52
+ #
53
+ # @return [StandupMD::Entry]
54
+ def find(date)
55
+ entries.bsearch { |e| e.date == date }
56
56
  end
57
57
 
58
58
  ##
@@ -129,38 +129,21 @@ module StandupMD
129
129
  to_h.to_json
130
130
  end
131
131
 
132
- ##
133
- # The first entry in the list. This method assumes the list has
134
- # already been sorted.
135
- #
136
- # @return [StandupMD::Entry]
137
- def first
138
- to_a.first
139
- end
132
+ # :section: Delegators
140
133
 
141
134
  ##
142
- # The last entry in the list. This method assumes the list has
143
- # already been sorted.
135
+ # The following are forwarded to @entries, which is the underly array of
136
+ # entries.
144
137
  #
145
- # @return [StandupMD::Entry]
146
- def last
147
- to_a.last
148
- end
149
-
150
- ##
151
- # How many entries are in the list.
138
+ # +each+:: Iterate over each entry.
152
139
  #
153
- # @return [Integer]
154
- def size
155
- @entries.size
156
- end
157
-
158
- ##
159
- # Is the list empty?
140
+ # +empty?+:: Is the list empty?
160
141
  #
161
- # @return [Boolean] true if empty
162
- def empty?
163
- @entries.empty?
164
- end
142
+ # +size+:: How many items are in the list?
143
+ #
144
+ # +first+:: The first record in the list.
145
+ #
146
+ # +last+:: The last record in the list.
147
+ def_delegators :@entries, :each, :empty?, :size, :first, :last
165
148
  end
166
149
  end