twitter_hashtag 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- twitter_hashtag (0.0.1)
4
+ twitter_hashtag (0.0.2)
5
5
  json (~> 1.4.6)
6
6
 
7
7
  GEM
@@ -7,13 +7,15 @@ module TwitterHashtag
7
7
  @results = response['results']
8
8
  end
9
9
 
10
+ attr_reader :results
11
+
10
12
  def format
11
- if @results.empty?
13
+ if results.empty?
12
14
  puts 'None found.'
13
15
  exit 1
14
16
  else
15
17
  puts 'Results:'
16
- TwitterHashtag::Tweet.output(@results)
18
+ TwitterHashtag::Tweet.output(results)
17
19
  end
18
20
  end
19
21
 
@@ -11,7 +11,9 @@ module TwitterHashtag
11
11
 
12
12
  def initialize(tweet_hash)
13
13
  @tweet_hash = tweet_hash
14
- end
14
+ end
15
+
16
+ attr_reader :tweet_hash
15
17
 
16
18
  def output
17
19
  puts [SEPARATOR, user, text, link].join("\n")
@@ -20,15 +22,15 @@ module TwitterHashtag
20
22
  private
21
23
 
22
24
  def user
23
- @tweet_hash['from_user']
25
+ tweet_hash['from_user']
24
26
  end
25
27
 
26
28
  def text
27
- @tweet_hash['text']
29
+ tweet_hash['text']
28
30
  end
29
31
 
30
32
  def id
31
- @tweet_hash['id_str']
33
+ tweet_hash['id_str']
32
34
  end
33
35
 
34
36
  def link
@@ -1,3 +1,3 @@
1
1
  module TwitterHashtag
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter_hashtag
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Justin Ko