<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> Class: Doing::Items — Documentation by YARD 0.9.26 </title> <link rel="stylesheet" href="../css/style.css" type="text/css" /> <link rel="stylesheet" href="../css/common.css" type="text/css" /> <script type="text/javascript"> pathId = "Doing::Items"; relpath = '../'; </script> <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script> <script type="text/javascript" charset="utf-8" src="../js/app.js"></script> </head> <body> <div class="nav_wrap"> <iframe id="nav" src="../class_list.html?1"></iframe> <div id="resizer"></div> </div> <div id="main" tabindex="-1"> <div id="header"> <div id="menu"> <a href="../_index.html">Index (I)</a> » <span class='title'><span class='object_link'><a href="../Doing.html" title="Doing (module)">Doing</a></span></span> » <span class="title">Items</span> </div> <div id="search"> <a class="full_list_link" id="class_list_link" href="../class_list.html"> <svg width="24" height="24"> <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect> <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect> <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect> </svg> </a> </div> <div class="clear"></div> </div> <div id="content"><h1>Class: Doing::Items </h1> <div class="box_info"> <dl> <dt>Inherits:</dt> <dd> <span class="inheritName"><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></span> <ul class="fullTree"> <li>Object</li> <li class="next"><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></li> <li class="next">Doing::Items</li> </ul> <a href="#" class="inheritanceTree">show all</a> </dd> </dl> <dl> <dt>Defined in:</dt> <dd>lib/doing/items.rb</dd> </dl> </div> <h2>Overview</h2><div class="docstring"> <div class="discussion"> <p>Items Array</p> </div> </div> <div class="tags"> </div> <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2> <ul class="summary"> <li class="public "> <span class="summary_signature"> <a href="#sections-instance_method" title="#sections (instance method)">#<strong>sections</strong> ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'><p>Returns the value of attribute sections.</p> </div></span> </li> </ul> <h2> Instance Method Summary <small><a href="#" class="summary_toggle">collapse</a></small> </h2> <ul class="summary"> <li class="public "> <span class="summary_signature"> <a href="#add_section-instance_method" title="#add_section (instance method)">#<strong>add_section</strong>(section, log: false) ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'><p>Add a new section to the sections array.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#delete_item-instance_method" title="#delete_item (instance method)">#<strong>delete_item</strong>(item, single: false) ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'><p>Delete an item from the index.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#in_section-instance_method" title="#in_section (instance method)">#<strong>in_section</strong>(section) ⇒ Items </a> </span> <span class="summary_desc"><div class='inline'><p>Get a new Items object containing only items in a specified section.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> ⇒ Items </a> </span> <span class="note title constructor">constructor</span> <span class="summary_desc"><div class='inline'><p>A new instance of Items.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#section%3F-instance_method" title="#section? (instance method)">#<strong>section?</strong>(section) ⇒ Boolean </a> </span> <span class="summary_desc"><div class='inline'><p>Test if section already exists.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#section_titles-instance_method" title="#section_titles (instance method)">#<strong>section_titles</strong> ⇒ Array </a> </span> <span class="summary_desc"><div class='inline'><p>List sections, title only.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'><p>Output sections and items in Doing file format.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#update_item-instance_method" title="#update_item (instance method)">#<strong>update_item</strong>(old_item, new_item) ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'><p>Update an item in the index with a modified item.</p> </div></span> </li> </ul> <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></h3> <p class="inherited"><span class='object_link'><a href="../Array.html#highlight_tags-instance_method" title="Array#highlight_tags (method)">#highlight_tags</a></span>, <span class='object_link'><a href="../Array.html#log_tags-instance_method" title="Array#log_tags (method)">#log_tags</a></span>, <span class='object_link'><a href="../Array.html#nested_hash-instance_method" title="Array#nested_hash (method)">#nested_hash</a></span>, <span class='object_link'><a href="../Array.html#to_tags-instance_method" title="Array#to_tags (method)">#to_tags</a></span>, <span class='object_link'><a href="../Array.html#to_tags!-instance_method" title="Array#to_tags! (method)">#to_tags!</a></span></p> <div id="constructor_details" class="method_details_list"> <h2>Constructor Details</h2> <div class="method_details first"> <h3 class="signature first" id="initialize-instance_method"> #<strong>initialize</strong> ⇒ <tt><span class='object_link'><a href="" title="Doing::Items (class)">Items</a></span></tt> </h3><div class="docstring"> <div class="discussion"> <p>Returns a new instance of Items.</p> </div> </div> <div class="tags"> </div> </div> </div> <div id="instance_attr_details" class="attr_details"> <h2>Instance Attribute Details</h2> <span id="sections=-instance_method"></span> <div class="method_details first"> <h3 class="signature first" id="sections-instance_method"> #<strong>sections</strong> ⇒ <tt>Object</tt> </h3><div class="docstring"> <div class="discussion"> <p>Returns the value of attribute sections.</p> </div> </div> <div class="tags"> </div> </div> </div> <div id="instance_method_details" class="method_details_list"> <h2>Instance Method Details</h2> <div class="method_details first"> <h3 class="signature first" id="add_section-instance_method"> #<strong>add_section</strong>(section, log: false) ⇒ <tt>Object</tt> </h3><div class="docstring"> <div class="discussion"> <p>Add a new section to the sections array. Accepts either a Section object, or a title string that will be converted into a Section.</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>section</span> <span class='type'>(<tt><span class='object_link'><a href="Section.html" title="Doing::Section (class)">Section</a></span></tt>)</span> — <div class='inline'><p>The section to add. A String value will be converted to Section automatically.</p> </div> </li> <li> <span class='name'>log</span> <span class='type'>(<tt>Boolean</tt>)</span> <em class="default">(defaults to: <tt>false</tt>)</em> — <div class='inline'><p>Add a log message notifying the user about the creation of the section.</p> </div> </li> </ul> <p class="tag_title">Returns:</p> <ul class="return"> <li> <span class='type'></span> <div class='inline'><p>nothing</p> </div> </li> </ul> </div> </div> <div class="method_details "> <h3 class="signature " id="delete_item-instance_method"> #<strong>delete_item</strong>(item, single: false) ⇒ <tt>Object</tt> </h3><div class="docstring"> <div class="discussion"> <p>Delete an item from the index</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>item</span> <span class='type'></span> — <div class='inline'><p>The item</p> </div> </li> </ul> </div> </div> <div class="method_details "> <h3 class="signature " id="in_section-instance_method"> #<strong>in_section</strong>(section) ⇒ <tt><span class='object_link'><a href="" title="Doing::Items (class)">Items</a></span></tt> </h3><div class="docstring"> <div class="discussion"> <p>Get a new Items object containing only items in a specified section</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>section</span> <span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span> — <div class='inline'><p>section title</p> </div> </li> </ul> <p class="tag_title">Returns:</p> <ul class="return"> <li> <span class='type'>(<tt><span class='object_link'><a href="" title="Doing::Items (class)">Items</a></span></tt>)</span> — <div class='inline'><p>Array of items</p> </div> </li> </ul> </div> </div> <div class="method_details "> <h3 class="signature " id="section?-instance_method"> #<strong>section?</strong>(section) ⇒ <tt>Boolean</tt> </h3><div class="docstring"> <div class="discussion"> <p>Test if section already exists</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>section</span> <span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span> — <div class='inline'><p>section title</p> </div> </li> </ul> <p class="tag_title">Returns:</p> <ul class="return"> <li> <span class='type'>(<tt>Boolean</tt>)</span> — <div class='inline'><p>true if section exists</p> </div> </li> </ul> </div> </div> <div class="method_details "> <h3 class="signature " id="section_titles-instance_method"> #<strong>section_titles</strong> ⇒ <tt><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></tt> </h3><div class="docstring"> <div class="discussion"> <p>List sections, title only</p> </div> </div> <div class="tags"> <p class="tag_title">Returns:</p> <ul class="return"> <li> <span class='type'>(<tt><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></tt>)</span> — <div class='inline'><p>section titles</p> </div> </li> </ul> </div> </div> <div class="method_details "> <h3 class="signature " id="to_s-instance_method"> #<strong>to_s</strong> ⇒ <tt>Object</tt> </h3><div class="docstring"> <div class="discussion"> <p>Output sections and items in Doing file format</p> </div> </div> <div class="tags"> </div> </div> <div class="method_details "> <h3 class="signature " id="update_item-instance_method"> #<strong>update_item</strong>(old_item, new_item) ⇒ <tt>Object</tt> </h3><div class="docstring"> <div class="discussion"> <p>Update an item in the index with a modified item</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>old_item</span> <span class='type'></span> — <div class='inline'><p>The old item</p> </div> </li> <li> <span class='name'>new_item</span> <span class='type'></span> — <div class='inline'><p>The new item</p> </div> </li> </ul> <p class="tag_title">Raises:</p> <ul class="raise"> <li> <span class='type'>(<tt>ItemNotFound</tt>)</span> </li> </ul> </div> </div> </div> </div> <div id="footer"> Generated on Sat Nov 27 13:57:12 2021 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.26 (ruby-3.0.1). </div> </div> </body> </html>