twords 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14f8d19e5e919775262f1711702693d2d9c1bd04
4
- data.tar.gz: 997c565ad48498bac50db80fde8e56ed2a1d4ff8
3
+ metadata.gz: 8c61f756b270c5705f4c3ca17a75e6bed5c8e7af
4
+ data.tar.gz: 95137999f02c5f1b1193c66f6095362e68e42715
5
5
  SHA512:
6
- metadata.gz: 535d6f11f585e85465fd42f03e068f126935678b597c1f689e37149e797c5149718f629bb0cdaa448dfe9b397b3a2f84ab66d5c02452c5d8981c8cca59ceed8e
7
- data.tar.gz: 5c6eb12f69e02413868c931b8f85bb8d74b58846e1ba0d02c91b2d72d3014bca115c443bbcac5eeb28c6f4f3d1b570294eaa19264806e8dd7810d3444073e86e
6
+ metadata.gz: b75f30b0d3a93ff8341d05e5a68c88f295a9f8cdf6bf32ff2b05399244896f83ded2afbae890556abed01d62562f097260aa09d50e285ab6dbeac121a0a973f6
7
+ data.tar.gz: '0805b16be099bbc59975105f02635d7dc052da1e0195957c847d5b0658f7a1bd019af42a13ffbc678bc2cf6a6023d8b7ded6f14dfff332656802d9cbd59969e5'
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Twords
1
+ ![twords](http://msimonborg.com/twords/twords.png)
2
2
 
3
3
  ## Twitter word clouds
4
4
 
@@ -36,13 +36,16 @@ Twords.config do |config|
36
36
  end
37
37
  end
38
38
 
39
- twords = Twords.new 'user_one', 'user_two'
39
+ twords = Twords.new 'user_one', 'user_two' # A list of Twitter handles to include in the count.
40
40
 
41
41
  twords.audit
42
42
  # => true
43
43
 
44
44
  twords.words
45
- # => { "butts"=>35, "poo"=>32, "pups"=>28, ... }
45
+ # => { "butts"=>32, "poo"=>28, "pups"=>36, ... }
46
+
47
+ twords.words_forward # Sort descending. Alias #sort_words
48
+ # => [["pups", 36], ["butts", 32], ["poo", 28], ...]
46
49
  ```
47
50
 
48
51
  ## Development
data/lib/twords.rb CHANGED
@@ -74,6 +74,7 @@ class Twords
74
74
  def sort_words
75
75
  words.sort { |a, b| b.last <=> a.last }
76
76
  end
77
+ alias words_forward sort_words
77
78
 
78
79
  def timeline
79
80
  @_timeline ||= screen_names.map { |name| fetch_timeline(name) }.flatten
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Twords
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twords
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - M. Simon Borg