squarecoder 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/LICENSE.txt +20 -0
  2. data/README.rdoc +15 -0
  3. data/lib/doc/Squarecoder.html +116 -0
  4. data/lib/doc/Squarecoder/Transcoder.html +236 -0
  5. data/lib/doc/String.html +266 -0
  6. data/lib/doc/created.rid +5 -0
  7. data/lib/doc/images/add.png +0 -0
  8. data/lib/doc/images/brick.png +0 -0
  9. data/lib/doc/images/brick_link.png +0 -0
  10. data/lib/doc/images/bug.png +0 -0
  11. data/lib/doc/images/bullet_black.png +0 -0
  12. data/lib/doc/images/bullet_toggle_minus.png +0 -0
  13. data/lib/doc/images/bullet_toggle_plus.png +0 -0
  14. data/lib/doc/images/date.png +0 -0
  15. data/lib/doc/images/delete.png +0 -0
  16. data/lib/doc/images/find.png +0 -0
  17. data/lib/doc/images/loadingAnimation.gif +0 -0
  18. data/lib/doc/images/macFFBgHack.png +0 -0
  19. data/lib/doc/images/package.png +0 -0
  20. data/lib/doc/images/page_green.png +0 -0
  21. data/lib/doc/images/page_white_text.png +0 -0
  22. data/lib/doc/images/page_white_width.png +0 -0
  23. data/lib/doc/images/plugin.png +0 -0
  24. data/lib/doc/images/ruby.png +0 -0
  25. data/lib/doc/images/tag_blue.png +0 -0
  26. data/lib/doc/images/tag_green.png +0 -0
  27. data/lib/doc/images/transparent.png +0 -0
  28. data/lib/doc/images/wrench.png +0 -0
  29. data/lib/doc/images/wrench_orange.png +0 -0
  30. data/lib/doc/images/zoom.png +0 -0
  31. data/lib/doc/index.html +73 -0
  32. data/lib/doc/js/darkfish.js +153 -0
  33. data/lib/doc/js/jquery.js +18 -0
  34. data/lib/doc/js/navigation.js +142 -0
  35. data/lib/doc/js/search.js +94 -0
  36. data/lib/doc/js/search_index.js +1 -0
  37. data/lib/doc/js/searcher.js +228 -0
  38. data/lib/doc/rdoc.css +543 -0
  39. data/lib/doc/table_of_contents.html +64 -0
  40. data/lib/squarecoder.rb +8 -0
  41. data/lib/squarecoder/core_ext/string.rb +23 -0
  42. data/lib/squarecoder/errors.rb +4 -0
  43. data/lib/squarecoder/transcoder.rb +32 -0
  44. metadata +91 -0
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Aaron Breckenridge
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,15 @@
1
+ = squarecoder
2
+
3
+ Squarecoder encapsulates a Transcoder singleton that encodes and decodes a string using the {square code}[link:http://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html] method. You will also find two new String methods: String.square_encode and String.square_decode.
4
+
5
+ == Examples
6
+
7
+ Squarecoder::Transcoder.encode("haveaniceday") # => "hae and via ecy"
8
+ Squarecoder::Transcoder.decode("hae and via ecy") # => "haveaniceday"
9
+ "haveaniceday".square_encode # => "hae and via ecy"
10
+ "hae and via ecy".square_decode # => "haveaniceday"
11
+
12
+ == Copyright
13
+
14
+ Copyright (c) 2011 Aaron Breckenridge. See LICENSE.txt for
15
+ further details.
@@ -0,0 +1,116 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>Module: Squarecoder</title>
8
+
9
+ <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "./";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="module">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="./index.html">Home</a>
28
+ <a href="./table_of_contents.html#classes">Classes</a>
29
+ <a href="./table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>squarecoder/errors.rb
51
+ <li>squarecoder/transcoder.rb
52
+ <li>squarecoder.rb
53
+ </ul>
54
+ </nav>
55
+
56
+
57
+ </div>
58
+
59
+ <div id="class-metadata">
60
+
61
+
62
+
63
+
64
+ </div>
65
+
66
+ <div id="project-metadata">
67
+
68
+ <nav id="classindex-section" class="section project-section">
69
+ <h3 class="section-header">Class and Module Index</h3>
70
+
71
+ <ul class="link-list">
72
+
73
+ <li><a href="./Squarecoder.html">Squarecoder</a>
74
+
75
+ <li><a href="./Squarecoder/Transcoder.html">Squarecoder::Transcoder</a>
76
+
77
+ <li><a href="./String.html">String</a>
78
+
79
+ </ul>
80
+ </nav>
81
+
82
+ </div>
83
+ </nav>
84
+
85
+ <div id="documentation">
86
+ <h1 class="module">module Squarecoder</h1>
87
+
88
+ <div id="description" class="description">
89
+
90
+ </div><!-- description -->
91
+
92
+
93
+
94
+
95
+ <section id="5Buntitled-5D" class="documentation-section">
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+ <!-- Methods -->
105
+
106
+ </section><!-- 5Buntitled-5D -->
107
+
108
+ </div><!-- documentation -->
109
+
110
+
111
+ <footer id="validator-badges">
112
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
113
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.11.
114
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
115
+ </footer>
116
+
@@ -0,0 +1,236 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>Class: Squarecoder::Transcoder</title>
8
+
9
+ <link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "../";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="class">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../index.html">Home</a>
28
+ <a href="../table_of_contents.html#classes">Classes</a>
29
+ <a href="../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>squarecoder/transcoder.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+ <nav id="parent-class-section" class="section">
60
+ <h3 class="section-header">Parent</h3>
61
+
62
+ <p class="link">Object
63
+
64
+ </nav>
65
+
66
+ <!-- Included Modules -->
67
+ <nav id="includes-section" class="section">
68
+ <h3 class="section-header">Included Modules</h3>
69
+
70
+ <ul class="link-list">
71
+
72
+
73
+ <li><span class="include">Singleton</span>
74
+
75
+
76
+ </ul>
77
+ </nav>
78
+
79
+ <!-- Method Quickref -->
80
+ <nav id="method-list-section" class="section">
81
+ <h3 class="section-header">Methods</h3>
82
+
83
+ <ul class="link-list">
84
+
85
+ <li><a href="#method-c-decode">::decode</a>
86
+
87
+ <li><a href="#method-c-encode">::encode</a>
88
+
89
+ </ul>
90
+ </nav>
91
+
92
+ </div>
93
+
94
+ <div id="project-metadata">
95
+
96
+ <nav id="classindex-section" class="section project-section">
97
+ <h3 class="section-header">Class and Module Index</h3>
98
+
99
+ <ul class="link-list">
100
+
101
+ <li><a href="../Squarecoder.html">Squarecoder</a>
102
+
103
+ <li><a href="../Squarecoder/Transcoder.html">Squarecoder::Transcoder</a>
104
+
105
+ <li><a href="../String.html">String</a>
106
+
107
+ </ul>
108
+ </nav>
109
+
110
+ </div>
111
+ </nav>
112
+
113
+ <div id="documentation">
114
+ <h1 class="class">class Squarecoder::Transcoder</h1>
115
+
116
+ <div id="description" class="description">
117
+
118
+ <p>A <a href="Transcoder.html">Transcoder</a> is a Singleton used to encode
119
+ and decode strings.</p>
120
+
121
+ <pre class="ruby"><span class="ruby-constant">Squarecoder</span><span class="ruby-operator">::</span><span class="ruby-constant">Transcoder</span>.<span class="ruby-identifier">encode</span>(<span class="ruby-string">&quot;haveaniceday&quot;</span>) <span class="ruby-comment"># =&gt; &quot;hae and via ecy&quot;</span>
122
+ <span class="ruby-constant">Squarecoder</span><span class="ruby-operator">::</span><span class="ruby-constant">Transcoder</span>.<span class="ruby-identifier">decode</span>(<span class="ruby-string">&quot;hae and via ecy&quot;</span>) <span class="ruby-comment"># =&gt; &quot;haveaniceday&quot;</span>
123
+ <span class="ruby-string">&quot;haveaniceday&quot;</span>.<span class="ruby-identifier">square_encode</span> <span class="ruby-comment"># =&gt; &quot;hae and via ecy&quot;</span>
124
+ <span class="ruby-string">&quot;hae and via ecy&quot;</span>.<span class="ruby-identifier">square_decode</span> <span class="ruby-comment"># =&gt; &quot;haveaniceday&quot;</span>
125
+ </pre>
126
+
127
+ </div><!-- description -->
128
+
129
+
130
+
131
+
132
+ <section id="5Buntitled-5D" class="documentation-section">
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <!-- Methods -->
142
+
143
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
144
+ <h3 class="section-header">Public Class Methods</h3>
145
+
146
+
147
+ <div id="method-c-decode" class="method-detail ">
148
+
149
+ <div class="method-heading">
150
+ <span class="method-name">decode</span><span
151
+ class="method-args">(a_string, force = false)</span>
152
+ <span class="method-click-advice">click to toggle source</span>
153
+ </div>
154
+
155
+
156
+ <div class="method-description">
157
+
158
+ <p>Decode a <a href="../String.html">String</a></p>
159
+
160
+ <pre>+a_string+ is the String to decode
161
+ +force+ is a Boolean that tells the decoder to skip a cached value (unsupported)</pre>
162
+
163
+ <p>Returns a <a href="../String.html">String</a></p>
164
+
165
+
166
+
167
+ <div class="method-source-code" id="decode-source">
168
+ <pre><span class="ruby-comment"># File squarecoder/transcoder.rb, line 34</span>
169
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">decode</span> <span class="ruby-identifier">a_string</span>, <span class="ruby-identifier">force</span> = <span class="ruby-keyword">false</span>
170
+ <span class="ruby-identifier">encode</span>( <span class="ruby-identifier">a_string</span> ).<span class="ruby-identifier">gsub</span>(<span class="ruby-string">' '</span>, <span class="ruby-string">''</span>)
171
+ <span class="ruby-keyword">end</span></pre>
172
+ </div><!-- decode-source -->
173
+
174
+ </div>
175
+
176
+
177
+
178
+
179
+ </div><!-- decode-method -->
180
+
181
+
182
+ <div id="method-c-encode" class="method-detail ">
183
+
184
+ <div class="method-heading">
185
+ <span class="method-name">encode</span><span
186
+ class="method-args">(a_string, force = false)</span>
187
+ <span class="method-click-advice">click to toggle source</span>
188
+ </div>
189
+
190
+
191
+ <div class="method-description">
192
+
193
+ <p>Encode a <a href="../String.html">String</a></p>
194
+
195
+ <pre>+a_string+ is the String to encode and must be less than 81 characters
196
+ +force+ is a Boolean that tells the encoder to skip a cached value (unsupported)</pre>
197
+
198
+ <p>Returns a <a href="../String.html">String</a></p>
199
+
200
+
201
+
202
+ <div class="method-source-code" id="encode-source">
203
+ <pre><span class="ruby-comment"># File squarecoder/transcoder.rb, line 18</span>
204
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">encode</span> <span class="ruby-identifier">a_string</span>, <span class="ruby-identifier">force</span> = <span class="ruby-keyword">false</span>
205
+ <span class="ruby-identifier">this_string</span> = <span class="ruby-identifier">a_string</span>
206
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">Squarecoder</span><span class="ruby-operator">::</span><span class="ruby-constant">TooLongError</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">this_string</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">81</span>
207
+ <span class="ruby-identifier">len</span> = ( <span class="ruby-identifier">this_string</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">**</span> ( <span class="ruby-value">0.5</span> ) ).<span class="ruby-identifier">ceil</span>
208
+ <span class="ruby-identifier">arry</span> = <span class="ruby-identifier">this_string</span>.<span class="ruby-identifier">scan</span>( <span class="ruby-regexp">/./</span> ).<span class="ruby-identifier">each_slice</span>( <span class="ruby-identifier">len</span> ).<span class="ruby-identifier">to_a</span>
209
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">arry</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">len</span>
210
+ <span class="ruby-identifier">arry</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">fill</span>( <span class="ruby-string">' '</span>, <span class="ruby-identifier">arry</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">..</span>( <span class="ruby-identifier">len</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span> ) )
211
+ <span class="ruby-keyword">end</span>
212
+ <span class="ruby-identifier">arry</span>.<span class="ruby-identifier">transpose</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">join</span> }.<span class="ruby-identifier">join</span>(<span class="ruby-string">' '</span>).<span class="ruby-identifier">rstrip</span>
213
+ <span class="ruby-keyword">end</span></pre>
214
+ </div><!-- encode-source -->
215
+
216
+ </div>
217
+
218
+
219
+
220
+
221
+ </div><!-- encode-method -->
222
+
223
+
224
+ </section><!-- public-class-method-details -->
225
+
226
+ </section><!-- 5Buntitled-5D -->
227
+
228
+ </div><!-- documentation -->
229
+
230
+
231
+ <footer id="validator-badges">
232
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
233
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.11.
234
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
235
+ </footer>
236
+
@@ -0,0 +1,266 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>Class: String</title>
8
+
9
+ <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "./";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="class">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="./index.html">Home</a>
28
+ <a href="./table_of_contents.html#classes">Classes</a>
29
+ <a href="./table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>squarecoder/core_ext/string.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+ <nav id="parent-class-section" class="section">
60
+ <h3 class="section-header">Parent</h3>
61
+
62
+ <p class="link">Object
63
+
64
+ </nav>
65
+
66
+
67
+ <!-- Method Quickref -->
68
+ <nav id="method-list-section" class="section">
69
+ <h3 class="section-header">Methods</h3>
70
+
71
+ <ul class="link-list">
72
+
73
+ <li><a href="#method-i-square_decode">#square_decode</a>
74
+
75
+ <li><a href="#method-i-square_decode-21">#square_decode!</a>
76
+
77
+ <li><a href="#method-i-square_encode">#square_encode</a>
78
+
79
+ <li><a href="#method-i-square_encode-21">#square_encode!</a>
80
+
81
+ </ul>
82
+ </nav>
83
+
84
+ </div>
85
+
86
+ <div id="project-metadata">
87
+
88
+ <nav id="classindex-section" class="section project-section">
89
+ <h3 class="section-header">Class and Module Index</h3>
90
+
91
+ <ul class="link-list">
92
+
93
+ <li><a href="./Squarecoder.html">Squarecoder</a>
94
+
95
+ <li><a href="./Squarecoder/Transcoder.html">Squarecoder::Transcoder</a>
96
+
97
+ <li><a href="./String.html">String</a>
98
+
99
+ </ul>
100
+ </nav>
101
+
102
+ </div>
103
+ </nav>
104
+
105
+ <div id="documentation">
106
+ <h1 class="class">class String</h1>
107
+
108
+ <div id="description" class="description">
109
+
110
+ </div><!-- description -->
111
+
112
+
113
+
114
+
115
+ <section id="5Buntitled-5D" class="documentation-section">
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+ <!-- Methods -->
125
+
126
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
127
+ <h3 class="section-header">Public Instance Methods</h3>
128
+
129
+
130
+ <div id="method-i-square_decode" class="method-detail ">
131
+
132
+ <div class="method-heading">
133
+ <span class="method-name">square_decode</span><span
134
+ class="method-args">()</span>
135
+ <span class="method-click-advice">click to toggle source</span>
136
+ </div>
137
+
138
+
139
+ <div class="method-description">
140
+
141
+ <p>Decode a <a href="String.html">String</a></p>
142
+
143
+ <p>Returns a <a href="String.html">String</a></p>
144
+
145
+
146
+
147
+ <div class="method-source-code" id="square_decode-source">
148
+ <pre><span class="ruby-comment"># File squarecoder/core_ext/string.rb, line 17</span>
149
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">square_decode</span>
150
+ <span class="ruby-identifier">dup</span>.<span class="ruby-identifier">square_decode!</span>
151
+ <span class="ruby-keyword">end</span></pre>
152
+ </div><!-- square_decode-source -->
153
+
154
+ </div>
155
+
156
+
157
+
158
+
159
+ </div><!-- square_decode-method -->
160
+
161
+
162
+ <div id="method-i-square_decode-21" class="method-detail ">
163
+
164
+ <div class="method-heading">
165
+ <span class="method-name">square_decode!</span><span
166
+ class="method-args">()</span>
167
+ <span class="method-click-advice">click to toggle source</span>
168
+ </div>
169
+
170
+
171
+ <div class="method-description">
172
+
173
+
174
+
175
+
176
+
177
+ <div class="method-source-code" id="square_decode-21-source">
178
+ <pre><span class="ruby-comment"># File squarecoder/core_ext/string.rb, line 21</span>
179
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">square_decode!</span>
180
+ <span class="ruby-identifier">replace</span>( <span class="ruby-constant">Squarecoder</span><span class="ruby-operator">::</span><span class="ruby-constant">Transcoder</span>.<span class="ruby-identifier">decode</span>( <span class="ruby-keyword">self</span> ) )
181
+ <span class="ruby-keyword">end</span></pre>
182
+ </div><!-- square_decode-21-source -->
183
+
184
+ </div>
185
+
186
+
187
+
188
+
189
+ </div><!-- square_decode-21-method -->
190
+
191
+
192
+ <div id="method-i-square_encode" class="method-detail ">
193
+
194
+ <div class="method-heading">
195
+ <span class="method-name">square_encode</span><span
196
+ class="method-args">()</span>
197
+ <span class="method-click-advice">click to toggle source</span>
198
+ </div>
199
+
200
+
201
+ <div class="method-description">
202
+
203
+ <p>Encode a <a href="String.html">String</a></p>
204
+
205
+ <p>Returns a <a href="String.html">String</a></p>
206
+
207
+
208
+
209
+ <div class="method-source-code" id="square_encode-source">
210
+ <pre><span class="ruby-comment"># File squarecoder/core_ext/string.rb, line 6</span>
211
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">square_encode</span>
212
+ <span class="ruby-identifier">dup</span>.<span class="ruby-identifier">square_encode!</span>
213
+ <span class="ruby-keyword">end</span></pre>
214
+ </div><!-- square_encode-source -->
215
+
216
+ </div>
217
+
218
+
219
+
220
+
221
+ </div><!-- square_encode-method -->
222
+
223
+
224
+ <div id="method-i-square_encode-21" class="method-detail ">
225
+
226
+ <div class="method-heading">
227
+ <span class="method-name">square_encode!</span><span
228
+ class="method-args">()</span>
229
+ <span class="method-click-advice">click to toggle source</span>
230
+ </div>
231
+
232
+
233
+ <div class="method-description">
234
+
235
+
236
+
237
+
238
+
239
+ <div class="method-source-code" id="square_encode-21-source">
240
+ <pre><span class="ruby-comment"># File squarecoder/core_ext/string.rb, line 10</span>
241
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">square_encode!</span>
242
+ <span class="ruby-identifier">replace</span>( <span class="ruby-constant">Squarecoder</span><span class="ruby-operator">::</span><span class="ruby-constant">Transcoder</span>.<span class="ruby-identifier">encode</span>( <span class="ruby-keyword">self</span> ) )
243
+ <span class="ruby-keyword">end</span></pre>
244
+ </div><!-- square_encode-21-source -->
245
+
246
+ </div>
247
+
248
+
249
+
250
+
251
+ </div><!-- square_encode-21-method -->
252
+
253
+
254
+ </section><!-- public-instance-method-details -->
255
+
256
+ </section><!-- 5Buntitled-5D -->
257
+
258
+ </div><!-- documentation -->
259
+
260
+
261
+ <footer id="validator-badges">
262
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
263
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.11.
264
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
265
+ </footer>
266
+