aastdlib 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE.txt +21 -0
  4. data/README.md +39 -0
  5. data/Rakefile +6 -0
  6. data/aastdlib.gemspec +37 -0
  7. data/bin/console +14 -0
  8. data/bin/setup +8 -0
  9. data/doc/Aastdlib.html +110 -0
  10. data/doc/Array.html +164 -0
  11. data/doc/Dir.html +96 -0
  12. data/doc/Gemfile.html +95 -0
  13. data/doc/Hash.html +197 -0
  14. data/doc/Integer.html +162 -0
  15. data/doc/LICENSE_txt.html +112 -0
  16. data/doc/Object.html +501 -0
  17. data/doc/README_md.html +155 -0
  18. data/doc/Rakefile.html +96 -0
  19. data/doc/String.html +1240 -0
  20. data/doc/Symbol.html +197 -0
  21. data/doc/aastdlib_gemspec.html +127 -0
  22. data/doc/bin/setup.html +96 -0
  23. data/doc/created.rid +19 -0
  24. data/doc/css/fonts.css +167 -0
  25. data/doc/css/rdoc.css +590 -0
  26. data/doc/fonts/Lato-Light.ttf +0 -0
  27. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  28. data/doc/fonts/Lato-Regular.ttf +0 -0
  29. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  30. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  31. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  32. data/doc/images/add.png +0 -0
  33. data/doc/images/arrow_up.png +0 -0
  34. data/doc/images/brick.png +0 -0
  35. data/doc/images/brick_link.png +0 -0
  36. data/doc/images/bug.png +0 -0
  37. data/doc/images/bullet_black.png +0 -0
  38. data/doc/images/bullet_toggle_minus.png +0 -0
  39. data/doc/images/bullet_toggle_plus.png +0 -0
  40. data/doc/images/date.png +0 -0
  41. data/doc/images/delete.png +0 -0
  42. data/doc/images/find.png +0 -0
  43. data/doc/images/loadingAnimation.gif +0 -0
  44. data/doc/images/macFFBgHack.png +0 -0
  45. data/doc/images/package.png +0 -0
  46. data/doc/images/page_green.png +0 -0
  47. data/doc/images/page_white_text.png +0 -0
  48. data/doc/images/page_white_width.png +0 -0
  49. data/doc/images/plugin.png +0 -0
  50. data/doc/images/ruby.png +0 -0
  51. data/doc/images/tag_blue.png +0 -0
  52. data/doc/images/tag_green.png +0 -0
  53. data/doc/images/transparent.png +0 -0
  54. data/doc/images/wrench.png +0 -0
  55. data/doc/images/wrench_orange.png +0 -0
  56. data/doc/images/zoom.png +0 -0
  57. data/doc/index.html +114 -0
  58. data/doc/js/darkfish.js +161 -0
  59. data/doc/js/jquery.js +4 -0
  60. data/doc/js/navigation.js +142 -0
  61. data/doc/js/navigation.js.gz +0 -0
  62. data/doc/js/search.js +109 -0
  63. data/doc/js/search_index.js +1 -0
  64. data/doc/js/search_index.js.gz +0 -0
  65. data/doc/js/searcher.js +229 -0
  66. data/doc/js/searcher.js.gz +0 -0
  67. data/doc/table_of_contents.html +282 -0
  68. data/lib/aastdlib.rb +12 -0
  69. data/lib/aastdlib/array.rb +20 -0
  70. data/lib/aastdlib/file.rb +23 -0
  71. data/lib/aastdlib/hash.rb +22 -0
  72. data/lib/aastdlib/integer.rb +16 -0
  73. data/lib/aastdlib/object.rb +200 -0
  74. data/lib/aastdlib/string.rb +377 -0
  75. data/lib/aastdlib/symbol.rb +19 -0
  76. data/lib/aastdlib/version.rb +3 -0
  77. data/pkg/aastdlib-0.0.0.gem +0 -0
  78. data/pkg/aastdlib-0.0.1.gem +0 -0
  79. data/pkg/aastdlib-0.0.2.gem +0 -0
  80. metadata +179 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: '09df34d3c2845f615745c251eb31210b675099c2'
4
+ data.tar.gz: 26d996d35d20ac3efc9763b42d22f42aeb4165ee
5
+ SHA512:
6
+ metadata.gz: abd4b8f34611888cda06c4e77d3b46845bd142e86b2d5b26e2a3c87c05fb45a39c921a2c933ab5fa93b0f91d780f24a81d7b1a14d177960c2defedb69c1e2e94
7
+ data.tar.gz: 76cc7d3f73311f0461e0c3b95e11ebb68bf7799abe862e5543b27a7e63aa6e4f1ec0a3bf53648c6fe0bb036cd51eec4bb671fbd6ea7adc034f2e5f28838869c9
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in aastdlib.gemspec
4
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 arch4ngel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,39 @@
1
+ # Aastdlib
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/aastdlib`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'aastdlib'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install aastdlib
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/aastdlib.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,37 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "aastdlib/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "aastdlib"
8
+ spec.version = Aastdlib::VERSION
9
+ spec.authors = ["arch4ngel"]
10
+ spec.email = ["justinangel86@gmail.com"]
11
+
12
+ spec.summary = %q{Extensions to the Ruby Standard Library}
13
+ spec.homepage = "https://github.com/arch4ngel/aastdlib"
14
+ spec.license = "MIT"
15
+
16
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
18
+ if spec.respond_to?(:metadata)
19
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
20
+ else
21
+ raise "RubyGems 2.0 or newer is required to protect against " \
22
+ "public gem pushes."
23
+ end
24
+
25
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
26
+ f.match(%r{^(test|spec|features)/})
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ spec.add_development_dependency "bundler", "~> 1.15"
33
+ spec.add_development_dependency "rake", "~> 10.0"
34
+ spec.add_development_dependency "rspec", "~> 3.0"
35
+ spec.add_dependency("terminal-table", "~> 1.8.0")
36
+
37
+ end
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "aastdlib"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,110 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>module Aastdlib - RDoc Documentation</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "./";
11
+ var index_rel_prefix = "./";
12
+ </script>
13
+
14
+ <script src="./js/jquery.js"></script>
15
+ <script src="./js/darkfish.js"></script>
16
+
17
+ <link href="./css/fonts.css" rel="stylesheet">
18
+ <link href="./css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+ <body id="top" role="document" class="module">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="./index.html" rel="home">Home</a>
28
+ </h2>
29
+
30
+ <div id="table-of-contents-navigation">
31
+ <a href="./table_of_contents.html#pages">Pages</a>
32
+ <a href="./table_of_contents.html#classes">Classes</a>
33
+ <a href="./table_of_contents.html#methods">Methods</a>
34
+ </div>
35
+ </div>
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+
55
+
56
+ <div id="class-metadata">
57
+
58
+
59
+
60
+
61
+
62
+ </div>
63
+ </nav>
64
+
65
+ <main role="main" aria-labelledby="module-Aastdlib">
66
+ <h1 id="module-Aastdlib" class="module">
67
+ module Aastdlib
68
+ </h1>
69
+
70
+ <section class="description">
71
+
72
+ </section>
73
+
74
+
75
+
76
+
77
+ <section id="5Buntitled-5D" class="documentation-section">
78
+
79
+
80
+
81
+
82
+
83
+ <section class="constants-list">
84
+ <header>
85
+ <h3>Constants</h3>
86
+ </header>
87
+ <dl>
88
+
89
+ <dt id="VERSION">VERSION
90
+
91
+ <dd>
92
+
93
+
94
+ </dl>
95
+ </section>
96
+
97
+
98
+
99
+
100
+
101
+ </section>
102
+ </main>
103
+
104
+
105
+ <footer id="validator-badges" role="contentinfo">
106
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
107
+ <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
108
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
109
+ </footer>
110
+
@@ -0,0 +1,164 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Array - RDoc Documentation</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "./";
11
+ var index_rel_prefix = "./";
12
+ </script>
13
+
14
+ <script src="./js/jquery.js"></script>
15
+ <script src="./js/darkfish.js"></script>
16
+
17
+ <link href="./css/fonts.css" rel="stylesheet">
18
+ <link href="./css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+ <body id="top" role="document" class="class">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="./index.html" rel="home">Home</a>
28
+ </h2>
29
+
30
+ <div id="table-of-contents-navigation">
31
+ <a href="./table_of_contents.html#pages">Pages</a>
32
+ <a href="./table_of_contents.html#classes">Classes</a>
33
+ <a href="./table_of_contents.html#methods">Methods</a>
34
+ </div>
35
+ </div>
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+
55
+
56
+ <div id="class-metadata">
57
+
58
+ <div id="parent-class-section" class="nav-section">
59
+ <h3>Parent</h3>
60
+
61
+
62
+ <p class="link"><a href="Object.html">Object</a>
63
+
64
+ </div>
65
+
66
+
67
+
68
+ <!-- Method Quickref -->
69
+ <div id="method-list-section" class="nav-section">
70
+ <h3>Methods</h3>
71
+
72
+ <ul class="link-list" role="directory">
73
+
74
+ <li ><a href="#method-i-indices">#indices</a>
75
+
76
+ </ul>
77
+ </div>
78
+
79
+ </div>
80
+ </nav>
81
+
82
+ <main role="main" aria-labelledby="class-Array">
83
+ <h1 id="class-Array" class="class">
84
+ class Array
85
+ </h1>
86
+
87
+ <section class="description">
88
+
89
+ </section>
90
+
91
+
92
+
93
+
94
+ <section id="5Buntitled-5D" class="documentation-section">
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
105
+ <header>
106
+ <h3>Public Instance Methods</h3>
107
+ </header>
108
+
109
+
110
+ <div id="method-i-indices" class="method-detail ">
111
+
112
+ <div class="method-heading">
113
+ <span class="method-name">indices</span><span
114
+ class="method-args">(value)</span>
115
+
116
+ <span class="method-click-advice">click to toggle source</span>
117
+
118
+ </div>
119
+
120
+
121
+ <div class="method-description">
122
+
123
+ <p>Accepts a value that is check against each element in the array itself and
124
+ returns a new array containing the index for each matching element.</p>
125
+
126
+
127
+
128
+
129
+ <div class="method-source-code" id="indices-source">
130
+ <pre><span class="ruby-comment"># File lib/aastdlib/array.rb, line 6</span>
131
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">indices</span>(<span class="ruby-identifier">value</span>)
132
+ <span class="ruby-identifier">counter</span> = <span class="ruby-value">0</span>
133
+ <span class="ruby-identifier">indices</span> = []
134
+
135
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
136
+ <span class="ruby-identifier">indices</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">counter</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">value</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">v</span>
137
+ <span class="ruby-identifier">counter</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>
138
+ <span class="ruby-keyword">end</span>
139
+
140
+ <span class="ruby-keyword">return</span> <span class="ruby-identifier">indices</span>
141
+
142
+ <span class="ruby-keyword">end</span></pre>
143
+ </div>
144
+
145
+ </div>
146
+
147
+
148
+
149
+
150
+ </div>
151
+
152
+
153
+ </section>
154
+
155
+ </section>
156
+ </main>
157
+
158
+
159
+ <footer id="validator-badges" role="contentinfo">
160
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
161
+ <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
162
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
163
+ </footer>
164
+
@@ -0,0 +1,96 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>module Dir - RDoc Documentation</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "./";
11
+ var index_rel_prefix = "./";
12
+ </script>
13
+
14
+ <script src="./js/jquery.js"></script>
15
+ <script src="./js/darkfish.js"></script>
16
+
17
+ <link href="./css/fonts.css" rel="stylesheet">
18
+ <link href="./css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+ <body id="top" role="document" class="module">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="./index.html" rel="home">Home</a>
28
+ </h2>
29
+
30
+ <div id="table-of-contents-navigation">
31
+ <a href="./table_of_contents.html#pages">Pages</a>
32
+ <a href="./table_of_contents.html#classes">Classes</a>
33
+ <a href="./table_of_contents.html#methods">Methods</a>
34
+ </div>
35
+ </div>
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+
55
+
56
+ <div id="class-metadata">
57
+
58
+
59
+
60
+
61
+
62
+ </div>
63
+ </nav>
64
+
65
+ <main role="main" aria-labelledby="module-Dir">
66
+ <h1 id="module-Dir" class="module">
67
+ module Dir
68
+ </h1>
69
+
70
+ <section class="description">
71
+
72
+ </section>
73
+
74
+
75
+
76
+
77
+ <section id="5Buntitled-5D" class="documentation-section">
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+ </section>
88
+ </main>
89
+
90
+
91
+ <footer id="validator-badges" role="contentinfo">
92
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
93
+ <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
94
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
95
+ </footer>
96
+