quickbooks 0.0.3 → 0.0.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.
- data/README +9 -5
- data/Rakefile +2 -2
- data/doc/classes/Array.html +244 -0
- data/doc/classes/Array.src/M000001.html +18 -0
- data/doc/classes/Array.src/M000002.html +19 -0
- data/doc/classes/Array.src/M000003.html +18 -0
- data/doc/classes/Array.src/M000004.html +23 -0
- data/doc/classes/Array.src/M000005.html +18 -0
- data/doc/classes/Array.src/M000006.html +21 -0
- data/doc/classes/Array.src/M000007.html +18 -0
- data/doc/classes/Array.src/M000008.html +18 -0
- data/doc/classes/Class.html +5 -5
- data/doc/classes/Class.src/{M000003.html → M000027.html} +1 -1
- data/doc/classes/Hash.html +264 -14
- data/doc/classes/Hash.src/M000009.html +18 -0
- data/doc/classes/Hash.src/M000010.html +21 -0
- data/doc/classes/Hash.src/M000011.html +18 -0
- data/doc/classes/Hash.src/M000012.html +21 -0
- data/doc/classes/Hash.src/M000013.html +18 -0
- data/doc/classes/Hash.src/{M000001.html → M000014.html} +6 -5
- data/doc/classes/Hash.src/{M000002.html → M000015.html} +6 -2
- data/doc/classes/Hash.src/M000016.html +20 -0
- data/doc/classes/Hash.src/M000017.html +18 -0
- data/doc/classes/Hash.src/M000018.html +20 -0
- data/doc/classes/Hash.src/M000019.html +38 -0
- data/doc/classes/{Quickbooks/Qbxml/Error.src/M000031.html → Hash.src/M000020.html} +5 -5
- data/doc/classes/Hash.src/M000021.html +18 -0
- data/doc/classes/Hash.src/M000022.html +20 -0
- data/doc/classes/Hash.src/M000023.html +18 -0
- data/doc/classes/Hash.src/M000024.html +18 -0
- data/doc/classes/Hash.src/M000025.html +18 -0
- data/doc/classes/Hash.src/M000026.html +22 -0
- data/doc/classes/Object.html +56 -22
- data/doc/classes/Object.src/{M000004.html → M000028.html} +0 -0
- data/doc/classes/Object.src/{M000005.html → M000029.html} +0 -0
- data/doc/classes/Object.src/{M000006.html → M000030.html} +1 -1
- data/doc/classes/Object.src/{M000007.html → M000031.html} +0 -0
- data/doc/classes/Object.src/M000032.html +18 -0
- data/doc/classes/Object.src/M000033.html +18 -0
- data/doc/classes/QBHelpers/Ole.html +17 -17
- data/doc/classes/QBHelpers/Ole.src/{M000066.html → M000108.html} +0 -0
- data/doc/classes/QBHelpers/Ole.src/{M000067.html → M000109.html} +0 -0
- data/doc/classes/QBHelpers/Ole.src/{M000068.html → M000110.html} +0 -0
- data/doc/classes/Quickbooks.html +44 -4
- data/doc/classes/Quickbooks/{Qbxml/Error.html → Address.html} +14 -43
- data/doc/classes/Quickbooks/Address.src/M000107.html +19 -0
- data/doc/classes/Quickbooks/Base.html +118 -243
- data/doc/classes/Quickbooks/Base.src/{M000034.html → M000080.html} +1 -1
- data/doc/classes/Quickbooks/Base.src/{M000035.html → M000081.html} +1 -1
- data/doc/classes/Quickbooks/Base.src/{M000036.html → M000082.html} +1 -1
- data/doc/classes/Quickbooks/Base.src/{M000037.html → M000083.html} +1 -1
- data/doc/classes/Quickbooks/Base.src/M000084.html +23 -0
- data/doc/classes/Quickbooks/Base.src/{M000041.html → M000085.html} +1 -1
- data/doc/classes/Quickbooks/Base.src/{M000042.html → M000086.html} +2 -2
- data/doc/classes/Quickbooks/Base.src/{M000043.html → M000087.html} +3 -2
- data/doc/classes/Quickbooks/Base.src/M000088.html +19 -0
- data/doc/classes/Quickbooks/Base.src/{M000045.html → M000089.html} +1 -1
- data/doc/classes/Quickbooks/Base.src/M000090.html +19 -0
- data/doc/classes/Quickbooks/Base.src/{M000052.html → M000091.html} +1 -1
- data/doc/classes/Quickbooks/Base.src/M000092.html +45 -0
- data/doc/classes/Quickbooks/Base.src/{M000054.html → M000093.html} +2 -2
- data/doc/classes/Quickbooks/Base.src/M000094.html +18 -0
- data/doc/classes/Quickbooks/Base.src/M000095.html +20 -0
- data/doc/classes/Quickbooks/BillAddress.html +113 -0
- data/doc/classes/Quickbooks/Connection.html +68 -68
- data/doc/classes/Quickbooks/Connection.src/{M000056.html → M000097.html} +0 -0
- data/doc/classes/Quickbooks/Connection.src/{M000057.html → M000098.html} +0 -0
- data/doc/classes/Quickbooks/Connection.src/{M000058.html → M000099.html} +0 -1
- data/doc/classes/Quickbooks/Connection.src/{M000059.html → M000100.html} +1 -1
- data/doc/classes/Quickbooks/Connection.src/{M000060.html → M000101.html} +1 -1
- data/doc/classes/Quickbooks/Connection.src/{M000061.html → M000102.html} +2 -2
- data/doc/classes/Quickbooks/Connection.src/{M000062.html → M000103.html} +1 -1
- data/doc/classes/Quickbooks/Connection.src/{M000063.html → M000104.html} +1 -1
- data/doc/classes/Quickbooks/Connection.src/{M000064.html → M000105.html} +1 -1
- data/doc/classes/Quickbooks/Connection.src/{M000065.html → M000106.html} +2 -2
- data/doc/classes/Quickbooks/CreditCardInfo.html +113 -0
- data/doc/classes/Quickbooks/CustomerTypeRef.html +113 -0
- data/doc/classes/Quickbooks/ItemSalesTaxRef.html +113 -0
- data/doc/classes/Quickbooks/JobTypeRef.html +113 -0
- data/doc/classes/Quickbooks/ListItem.html +21 -44
- data/doc/classes/Quickbooks/ListItem.src/M000078.html +19 -0
- data/doc/classes/Quickbooks/ListItem.src/M000079.html +18 -0
- data/doc/classes/Quickbooks/Model.html +469 -0
- data/doc/classes/Quickbooks/Model.src/M000059.html +24 -0
- data/doc/classes/Quickbooks/Model.src/M000060.html +18 -0
- data/doc/classes/Quickbooks/Model.src/M000061.html +18 -0
- data/doc/classes/Quickbooks/Model.src/M000062.html +18 -0
- data/doc/classes/Quickbooks/Model.src/M000063.html +18 -0
- data/doc/classes/Quickbooks/Model.src/M000064.html +18 -0
- data/doc/classes/Quickbooks/Model.src/M000065.html +32 -0
- data/doc/classes/Quickbooks/Model.src/M000066.html +32 -0
- data/doc/classes/Quickbooks/Model.src/M000067.html +18 -0
- data/doc/classes/Quickbooks/{Base.src/M000046.html → Model.src/M000068.html} +2 -3
- data/doc/classes/Quickbooks/{Base.src/M000047.html → Model.src/M000069.html} +4 -4
- data/doc/classes/Quickbooks/{Base.src/M000048.html → Model.src/M000070.html} +2 -2
- data/doc/classes/Quickbooks/{Base.src/M000049.html → Model.src/M000071.html} +2 -2
- data/doc/classes/Quickbooks/{Base.src/M000050.html → Model.src/M000072.html} +3 -3
- data/doc/classes/Quickbooks/{Base.src/M000051.html → Model.src/M000073.html} +6 -5
- data/doc/classes/Quickbooks/Model.src/M000074.html +28 -0
- data/doc/classes/Quickbooks/Model.src/M000075.html +28 -0
- data/doc/classes/Quickbooks/Model.src/M000076.html +21 -0
- data/doc/classes/Quickbooks/Model.src/M000077.html +23 -0
- data/doc/classes/Quickbooks/ParentRef.html +113 -0
- data/doc/classes/Quickbooks/PreferredPaymentMethodRef.html +113 -0
- data/doc/classes/Quickbooks/PriceLevelRef.html +113 -0
- data/doc/classes/Quickbooks/Qbxml.html +0 -5
- data/doc/classes/Quickbooks/Qbxml/Request.html +55 -23
- data/doc/classes/Quickbooks/Qbxml/Request.src/M000050.html +34 -0
- data/doc/classes/Quickbooks/Qbxml/Request.src/{M000025.html → M000051.html} +2 -2
- data/doc/classes/Quickbooks/Qbxml/Request.src/M000052.html +81 -0
- data/doc/classes/Quickbooks/Qbxml/RequestSet.html +20 -20
- data/doc/classes/Quickbooks/Qbxml/RequestSet.src/{M000027.html → M000053.html} +0 -0
- data/doc/classes/Quickbooks/Qbxml/RequestSet.src/{M000028.html → M000054.html} +0 -0
- data/doc/classes/Quickbooks/Qbxml/RequestSet.src/{M000029.html → M000055.html} +0 -0
- data/doc/classes/Quickbooks/Qbxml/RequestSet.src/{M000030.html → M000056.html} +0 -0
- data/doc/classes/Quickbooks/Qbxml/Response.html +46 -46
- data/doc/classes/Quickbooks/Qbxml/Response.src/{M000015.html → M000041.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/Response.src/{M000016.html → M000042.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/Response.src/{M000017.html → M000043.html} +1 -2
- data/doc/classes/Quickbooks/Qbxml/Response.src/{M000018.html → M000044.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/Response.src/{M000019.html → M000045.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/Response.src/{M000020.html → M000046.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/Response.src/{M000021.html → M000047.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/Response.src/{M000022.html → M000048.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/Response.src/{M000023.html → M000049.html} +22 -11
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.html +35 -35
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/{M000008.html → M000034.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/{M000009.html → M000035.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/{M000010.html → M000036.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/{M000011.html → M000037.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/{M000012.html → M000038.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/{M000013.html → M000039.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/{M000014.html → M000040.html} +1 -1
- data/doc/classes/Quickbooks/Ref.html +139 -0
- data/doc/classes/Quickbooks/Ref.src/M000096.html +18 -0
- data/doc/classes/Quickbooks/SalesRepRef.html +113 -0
- data/doc/classes/Quickbooks/SalesTaxCodeRef.html +113 -0
- data/doc/classes/Quickbooks/ShipAddress.html +113 -0
- data/doc/classes/Quickbooks/TermsRef.html +113 -0
- data/doc/classes/Quickbooks/Transaction.html +21 -62
- data/doc/classes/Quickbooks/Transaction.src/M000057.html +19 -0
- data/doc/classes/Quickbooks/Transaction.src/M000058.html +18 -0
- data/doc/created.rid +1 -1
- data/doc/files/README.html +15 -4
- data/doc/files/lib/quickbooks/base_rb.html +15 -8
- data/doc/files/lib/quickbooks/connection_rb.html +1 -1
- data/doc/files/lib/quickbooks/model_rb.html +108 -0
- data/doc/files/lib/quickbooks/{qbxml/error_rb.html → models/common/address_rb.html} +5 -5
- data/doc/files/lib/quickbooks/models/common/all_refs_rb.html +101 -0
- data/doc/files/lib/quickbooks/models/customer/credit_card_info_rb.html +101 -0
- data/doc/files/lib/quickbooks/models/customer_rb.html +10 -1
- data/doc/files/lib/quickbooks/models/list_item_rb.html +1 -1
- data/doc/files/lib/quickbooks/models/transaction_rb.html +1 -1
- data/doc/files/lib/quickbooks/ole_helper_rb.html +1 -1
- data/doc/files/lib/quickbooks/qbxml/request_rb.html +1 -1
- data/doc/files/lib/quickbooks/qbxml/response_rb.html +1 -2
- data/doc/files/lib/quickbooks/qbxml_rb.html +109 -0
- data/doc/files/lib/quickbooks/ruby_magic_rb.html +1 -1
- data/doc/fr_class_index.html +16 -1
- data/doc/fr_file_index.html +5 -1
- data/doc/fr_method_index.html +110 -68
- data/lib/quickbooks/base.rb +54 -95
- data/lib/quickbooks/connection.rb +2 -3
- data/lib/quickbooks/model.rb +176 -0
- data/lib/quickbooks/models/common/address.rb +14 -0
- data/lib/quickbooks/models/common/all_refs.rb +36 -0
- data/lib/quickbooks/models/customer.rb +30 -31
- data/lib/quickbooks/models/customer/credit_card_info.rb +5 -0
- data/lib/quickbooks/models/list_item.rb +27 -16
- data/lib/quickbooks/models/transaction.rb +21 -12
- data/lib/quickbooks/qbxml.rb +2 -0
- data/lib/quickbooks/qbxml/request.rb +80 -31
- data/lib/quickbooks/qbxml/response.rb +21 -12
- data/lib/quickbooks/ruby_magic.rb +130 -4
- metadata +146 -74
- data/doc/classes/Quickbooks/Base.src/M000038.html +0 -19
- data/doc/classes/Quickbooks/Base.src/M000039.html +0 -25
- data/doc/classes/Quickbooks/Base.src/M000040.html +0 -27
- data/doc/classes/Quickbooks/Base.src/M000044.html +0 -19
- data/doc/classes/Quickbooks/Base.src/M000053.html +0 -36
- data/doc/classes/Quickbooks/Base.src/M000055.html +0 -18
- data/doc/classes/Quickbooks/ListItem.src/M000033.html +0 -31
- data/doc/classes/Quickbooks/Qbxml/Request.src/M000024.html +0 -23
- data/doc/classes/Quickbooks/Qbxml/Request.src/M000026.html +0 -57
- data/doc/classes/Quickbooks/Transaction.src/M000032.html +0 -26
- data/lib/quickbooks/qbxml/error.rb +0 -20
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>stringify_values (Hash)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/ruby_magic.rb, line 79</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stringify_values</span>
|
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">stringify_values!</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -5,16 +5,17 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>
|
|
8
|
+
<title>stringify_values! (Hash)</title>
|
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
11
|
</head>
|
|
12
12
|
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/quickbooks/ruby_magic.rb, line
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
|
15
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">
|
|
16
|
-
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">k</span
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/ruby_magic.rb, line 82</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stringify_values!</span>
|
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
|
16
|
+
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span>.<span class="ruby-identifier">to_s</span>
|
|
17
17
|
<span class="ruby-keyword kw">end</span>
|
|
18
|
+
<span class="ruby-keyword kw">self</span>
|
|
18
19
|
<span class="ruby-keyword kw">end</span></pre>
|
|
19
20
|
</body>
|
|
20
21
|
</html>
|
|
@@ -10,12 +10,16 @@
|
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
11
|
</head>
|
|
12
12
|
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/quickbooks/ruby_magic.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/ruby_magic.rb, line 92</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">diff</span>(<span class="ruby-identifier">hsh</span>)
|
|
15
15
|
<span class="ruby-identifier">dif</span> = {}
|
|
16
16
|
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
|
17
17
|
<span class="ruby-identifier">dif</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">hsh</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">k</span>)
|
|
18
|
-
<span class="ruby-
|
|
18
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">k</span>].<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:===</span>)
|
|
19
|
+
<span class="ruby-identifier">dif</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span>(<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">===</span> <span class="ruby-identifier">hsh</span>[<span class="ruby-identifier">k</span>])
|
|
20
|
+
<span class="ruby-keyword kw">else</span>
|
|
21
|
+
<span class="ruby-identifier">dif</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span>(<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">hsh</span>[<span class="ruby-identifier">k</span>])
|
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
|
19
23
|
<span class="ruby-keyword kw">end</span>
|
|
20
24
|
<span class="ruby-identifier">dif</span>
|
|
21
25
|
<span class="ruby-keyword kw">end</span></pre>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>- (Hash)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/ruby_magic.rb, line 105</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">-</span>(<span class="ruby-identifier">v</span>)
|
|
15
|
+
<span class="ruby-identifier">hsh</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>
|
|
16
|
+
(<span class="ruby-identifier">v</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">v</span> <span class="ruby-operator">:</span> [<span class="ruby-identifier">v</span>]).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">hsh</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">k</span>) }
|
|
17
|
+
<span class="ruby-identifier">hsh</span>
|
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>only (Hash)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/ruby_magic.rb, line 111</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">only</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">keys</span>)
|
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">only!</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">keys</span>)
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>only! (Hash)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/ruby_magic.rb, line 114</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">only!</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">keys</span>)
|
|
15
|
+
<span class="ruby-identifier">keys</span> = <span class="ruby-identifier">keys</span>.<span class="ruby-identifier">flatten</span>
|
|
16
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">k</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">keys</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">k</span>) }
|
|
17
|
+
<span class="ruby-keyword kw">self</span>
|
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>order! (Hash)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/ruby_magic.rb, line 121</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">order!</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">keys_in_order</span>)
|
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-value str">'@keys_in_order'</span>, <span class="ruby-identifier">keys_in_order</span>.<span class="ruby-identifier">flatten</span> <span class="ruby-operator">&</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">keys</span>) <span class="ruby-comment cmt"># (only the keys_in_order that are currently existing keys)</span>
|
|
16
|
+
<span class="ruby-keyword kw">class</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">self</span>
|
|
17
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keys</span>
|
|
18
|
+
<span class="ruby-ivar">@keys_in_order</span>
|
|
19
|
+
<span class="ruby-keyword kw">end</span>
|
|
20
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">values</span>
|
|
21
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">k</span>]}
|
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
|
23
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
24
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
|
|
25
|
+
<span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">k</span>, <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">k</span>])
|
|
26
|
+
<span class="ruby-keyword kw">end</span>
|
|
27
|
+
<span class="ruby-keyword kw">end</span>
|
|
28
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_key</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
29
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>
|
|
30
|
+
<span class="ruby-keyword kw">end</span>
|
|
31
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_value</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
32
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">each</span> <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>
|
|
33
|
+
<span class="ruby-keyword kw">end</span>
|
|
34
|
+
<span class="ruby-keyword kw">end</span>
|
|
35
|
+
<span class="ruby-keyword kw">self</span>
|
|
36
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
37
|
+
</body>
|
|
38
|
+
</html>
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>
|
|
8
|
+
<title>keys (Hash)</title>
|
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
11
|
</head>
|
|
12
12
|
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/quickbooks/
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
|
15
|
-
<span class="ruby-ivar">@
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/ruby_magic.rb, line 124</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keys</span>
|
|
15
|
+
<span class="ruby-ivar">@keys_in_order</span>
|
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
|
17
17
|
</body>
|
|
18
18
|
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>values (Hash)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/ruby_magic.rb, line 127</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">values</span>
|
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">k</span>]}
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>each (Hash)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/ruby_magic.rb, line 130</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
|
|
16
|
+
<span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">k</span>, <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">k</span>])
|
|
17
|
+
<span class="ruby-keyword kw">end</span>
|
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>each_key (Hash)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/ruby_magic.rb, line 135</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_key</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>each_value (Hash)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/ruby_magic.rb, line 138</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_value</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">each</span> <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>transform_keys (Hash)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/ruby_magic.rb, line 145</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">transform_keys</span>(<span class="ruby-identifier">trans_hash</span>)
|
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">transform_keys!</span>(<span class="ruby-identifier">trans_hash</span>)
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>transform_keys! (Hash)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/ruby_magic.rb, line 148</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">transform_keys!</span>(<span class="ruby-identifier">trans_hash</span>)
|
|
15
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"transform_keys takes a single hash argument"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">trans_hash</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
|
16
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each_key</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
|
|
17
|
+
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">trans_hash</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">k</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">trans_hash</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">:</span> <span class="ruby-identifier">k</span>] = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">k</span>)
|
|
18
|
+
<span class="ruby-keyword kw">end</span>
|
|
19
|
+
<span class="ruby-keyword kw">self</span>
|
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
21
|
+
</body>
|
|
22
|
+
</html>
|
data/doc/classes/Object.html
CHANGED
|
@@ -96,10 +96,12 @@ href="Class.html">Class</a>, and <a href="Hash.html">Hash</a>.
|
|
|
96
96
|
<h3 class="section-bar">Methods</h3>
|
|
97
97
|
|
|
98
98
|
<div class="name-list">
|
|
99
|
-
<a href="#
|
|
100
|
-
<a href="#
|
|
101
|
-
<a href="#
|
|
102
|
-
<a href="#
|
|
99
|
+
<a href="#M000028">delegate_methods</a>
|
|
100
|
+
<a href="#M000033">error?</a>
|
|
101
|
+
<a href="#M000032">errors</a>
|
|
102
|
+
<a href="#M000031">is_not_one_of?</a>
|
|
103
|
+
<a href="#M000030">is_one_of?</a>
|
|
104
|
+
<a href="#M000029">to_a</a>
|
|
103
105
|
</div>
|
|
104
106
|
</div>
|
|
105
107
|
|
|
@@ -121,12 +123,12 @@ href="Class.html">Class</a>, and <a href="Hash.html">Hash</a>.
|
|
|
121
123
|
<div id="methods">
|
|
122
124
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
123
125
|
|
|
124
|
-
<div id="method-
|
|
125
|
-
<a name="
|
|
126
|
+
<div id="method-M000028" class="method-detail">
|
|
127
|
+
<a name="M000028"></a>
|
|
126
128
|
|
|
127
129
|
<div class="method-heading">
|
|
128
|
-
<a href="Object.src/
|
|
129
|
-
onclick="popupCode('Object.src/
|
|
130
|
+
<a href="Object.src/M000028.html" target="Code" class="method-signature"
|
|
131
|
+
onclick="popupCode('Object.src/M000028.html');return false;">
|
|
130
132
|
<span class="method-name">delegate_methods</span><span class="method-args">(hsh)</span>
|
|
131
133
|
</a>
|
|
132
134
|
</div>
|
|
@@ -140,29 +142,61 @@ could be delegated to do the same thing as obj.full_text.length
|
|
|
140
142
|
</div>
|
|
141
143
|
</div>
|
|
142
144
|
|
|
143
|
-
<div id="method-
|
|
144
|
-
<a name="
|
|
145
|
+
<div id="method-M000033" class="method-detail">
|
|
146
|
+
<a name="M000033"></a>
|
|
145
147
|
|
|
146
148
|
<div class="method-heading">
|
|
147
|
-
<a href="Object.src/
|
|
148
|
-
onclick="popupCode('Object.src/
|
|
149
|
+
<a href="Object.src/M000033.html" target="Code" class="method-signature"
|
|
150
|
+
onclick="popupCode('Object.src/M000033.html');return false;">
|
|
151
|
+
<span class="method-name">error?</span><span class="method-args">()</span>
|
|
152
|
+
</a>
|
|
153
|
+
</div>
|
|
154
|
+
|
|
155
|
+
<div class="method-description">
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
|
|
159
|
+
<div id="method-M000032" class="method-detail">
|
|
160
|
+
<a name="M000032"></a>
|
|
161
|
+
|
|
162
|
+
<div class="method-heading">
|
|
163
|
+
<a href="Object.src/M000032.html" target="Code" class="method-signature"
|
|
164
|
+
onclick="popupCode('Object.src/M000032.html');return false;">
|
|
165
|
+
<span class="method-name">errors</span><span class="method-args">()</span>
|
|
166
|
+
</a>
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
<div class="method-description">
|
|
170
|
+
<p>
|
|
171
|
+
This way anything, even nil, can hold on to an error message to be picked
|
|
172
|
+
up later.
|
|
173
|
+
</p>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
<div id="method-M000031" class="method-detail">
|
|
178
|
+
<a name="M000031"></a>
|
|
179
|
+
|
|
180
|
+
<div class="method-heading">
|
|
181
|
+
<a href="Object.src/M000031.html" target="Code" class="method-signature"
|
|
182
|
+
onclick="popupCode('Object.src/M000031.html');return false;">
|
|
149
183
|
<span class="method-name">is_not_one_of?</span><span class="method-args">(*ary)</span>
|
|
150
184
|
</a>
|
|
151
185
|
</div>
|
|
152
186
|
|
|
153
187
|
<div class="method-description">
|
|
154
188
|
<p>
|
|
155
|
-
The opposite of <a href="Object.html#
|
|
189
|
+
The opposite of <a href="Object.html#M000030">is_one_of?</a>
|
|
156
190
|
</p>
|
|
157
191
|
</div>
|
|
158
192
|
</div>
|
|
159
193
|
|
|
160
|
-
<div id="method-
|
|
161
|
-
<a name="
|
|
194
|
+
<div id="method-M000030" class="method-detail">
|
|
195
|
+
<a name="M000030"></a>
|
|
162
196
|
|
|
163
197
|
<div class="method-heading">
|
|
164
|
-
<a href="Object.src/
|
|
165
|
-
onclick="popupCode('Object.src/
|
|
198
|
+
<a href="Object.src/M000030.html" target="Code" class="method-signature"
|
|
199
|
+
onclick="popupCode('Object.src/M000030.html');return false;">
|
|
166
200
|
<span class="method-name">is_one_of?</span><span class="method-args">(*ary)</span>
|
|
167
201
|
</a>
|
|
168
202
|
</div>
|
|
@@ -176,19 +210,19 @@ which is backward thinking, instead you should use this magic:
|
|
|
176
210
|
</div>
|
|
177
211
|
</div>
|
|
178
212
|
|
|
179
|
-
<div id="method-
|
|
180
|
-
<a name="
|
|
213
|
+
<div id="method-M000029" class="method-detail">
|
|
214
|
+
<a name="M000029"></a>
|
|
181
215
|
|
|
182
216
|
<div class="method-heading">
|
|
183
|
-
<a href="Object.src/
|
|
184
|
-
onclick="popupCode('Object.src/
|
|
217
|
+
<a href="Object.src/M000029.html" target="Code" class="method-signature"
|
|
218
|
+
onclick="popupCode('Object.src/M000029.html');return false;">
|
|
185
219
|
<span class="method-name">to_a</span><span class="method-args">()</span>
|
|
186
220
|
</a>
|
|
187
221
|
</div>
|
|
188
222
|
|
|
189
223
|
<div class="method-description">
|
|
190
224
|
<p>
|
|
191
|
-
Wraps any non
|
|
225
|
+
Wraps any non-<a href="Array.html">Array</a> into an array
|
|
192
226
|
</p>
|
|
193
227
|
</div>
|
|
194
228
|
</div>
|
|
File without changes
|
|
File without changes
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<pre><span class="ruby-comment cmt"># File lib/quickbooks/ruby_magic.rb, line 29</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_one_of?</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">ary</span>)
|
|
15
15
|
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"exists_in? requires an array to be passed"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">ary</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
|
|
16
|
-
<span class="ruby-identifier">ary</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-keyword kw">self</span>)
|
|
16
|
+
<span class="ruby-identifier">ary</span>.<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-keyword kw">self</span>)
|
|
17
17
|
<span class="ruby-keyword kw">end</span></pre>
|
|
18
18
|
</body>
|
|
19
19
|
</html>
|