anagram_algo 1.03 → 2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec_status +4 -0
- data/README.md +3 -3
- data/Rakefile +3 -1
- data/lib/anagram_algo/solver.rb +1 -1
- data/lib/anagram_algo/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41c0d6485a58d9db7e39f306eaf70d565f629e4f4d1333b076c24baec8a2b80d
|
4
|
+
data.tar.gz: '089af06db83ede39b90d57b19b9ce7387136a23443bb0941962018c4e3df5415'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48b4153061e5dd25f9e9ff12554772814019c68ad35593de68d8186313f3fb081843df36f0ffea9f20151f9b3b9951f6eb257d6500ce3f305dbb7bcd669e2663
|
7
|
+
data.tar.gz: 2d555da9c8f398e453f012c3ad411b29e06cea81e4eedcf146c4ada3995da4b018287488938b6258a02b967757f3ad88a3c430af0514722eed4e76f645de791e
|
data/.rspec_status
ADDED
data/README.md
CHANGED
@@ -5,7 +5,6 @@
|
|
5
5
|
|
6
6
|
#### AnagramAlgo is a simple algorithm to find and return list of anagrams from your text input.
|
7
7
|
|
8
|
-
|
9
8
|
## Installation
|
10
9
|
|
11
10
|
Add this line to your application's Gemfile:
|
@@ -24,7 +23,7 @@ Or install it yourself as:
|
|
24
23
|
|
25
24
|
## Usage
|
26
25
|
|
27
|
-
|
26
|
+
1) Add your text to a hash with `:text` symbol key, then pass the arguments to `AnagramAlgo.parse(args)` like the example below. If you don't pass any args, and just run `AnagramAlgo.parse` it will return sample data for testing.
|
28
27
|
|
29
28
|
```
|
30
29
|
args = { text: "Can a rat eat tar? How big is the arc of that car door? Could you pass me the book just below your elbow? Does your state have a coffee taste test? That cider is so sour I cried. It's not good to study in a dusty room. Would you like to see that thing at night? My chin is almost an inch long. Grab something cool to brag about. Don't act like a cat in public, please. It was our Daisy, robed like a princess, but bored all day long. Let's save that vase for later. Can an angel glean upon us? I seriously got stressed from resisting those desserts. Do you ever fluster, or are you always restful? Do you prefer the smell of lemon or melon?" }
|
@@ -32,7 +31,8 @@ args = { text: "Can a rat eat tar? How big is the arc of that car door? Could yo
|
|
32
31
|
anagram_hash = AnagramAlgo.parse(args)
|
33
32
|
```
|
34
33
|
|
35
|
-
|
34
|
+
2) The returned data will be in hash format like below:
|
35
|
+
|
36
36
|
You can access the data, like so: `anagram_hash[:results]` and `anagram_hash[:text]`
|
37
37
|
|
38
38
|
```
|
data/Rakefile
CHANGED
@@ -27,7 +27,9 @@ end
|
|
27
27
|
def run_anagram
|
28
28
|
# args = {text: "Can a rat eat tar? How big is the arc of that car door? Could you pass me the book just below your elbow? Does your state have a coffee taste test?" }
|
29
29
|
|
30
|
-
args = { text: "Can a rat eat tar? How big is the arc of that car door? Could you pass me the book just below your elbow? Does your state have a coffee taste test? That cider is so sour I cried. It's not good to study in a dusty room. Would you like to see that thing at night? My chin is almost an inch long. Grab something cool to brag about. Don't act like a cat in public, please. It was our Daisy, robed like a princess, but bored all day long. Let's save that vase for later. Can an angel glean upon us? I seriously got stressed from resisting those desserts. Do you ever fluster, or are you always restful? Do you prefer the smell of lemon or melon?" }
|
30
|
+
# args = { text: "Can a rat eat tar? How big is the arc of that car door? Could you pass me the book just below your elbow? Does your state have a coffee taste test? That cider is so sour I cried. It's not good to study in a dusty room. Would you like to see that thing at night? My chin is almost an inch long. Grab something cool to brag about. Don't act like a cat in public, please. It was our Daisy, robed like a princess, but bored all day long. Let's save that vase for later. Can an angel glean upon us? I seriously got stressed from resisting those desserts. Do you ever fluster, or are you always restful? Do you prefer the smell of lemon or melon?" }
|
31
|
+
|
32
|
+
args = {text: "Can a rat eat tar? How big is the arc of that car door? Could you pass me the book just below your elbow? Does your state have a coffee taste test?"}
|
31
33
|
|
32
34
|
anagram_hash = AnagramAlgo.parse(args)
|
33
35
|
|
data/lib/anagram_algo/solver.rb
CHANGED
data/lib/anagram_algo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anagram_algo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '
|
4
|
+
version: '2.0'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Booth
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -171,6 +171,7 @@ extra_rdoc_files: []
|
|
171
171
|
files:
|
172
172
|
- ".gitignore"
|
173
173
|
- ".rspec"
|
174
|
+
- ".rspec_status"
|
174
175
|
- ".travis.yml"
|
175
176
|
- CODE_OF_CONDUCT.md
|
176
177
|
- Gemfile
|