twsh 0.3.1 → 0.3.2

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: e9b2b434756b7503ef8da6caf0abcc0aae13d312
4
- data.tar.gz: e3a95c22f72fc78ceb8b135f081ef6a201724ca3
3
+ metadata.gz: 882457f4067329d734b42441ec8b72014a373062
4
+ data.tar.gz: 54f2bf772aa84bfb3c0cf58f26ef6753500a4024
5
5
  SHA512:
6
- metadata.gz: 128b3a8d3b720051337eb504faf721cdb04ffb0e84a6108f4745e68322f9c237da7416063bbf37e04d290300ea7a1d3f0c249867b3dd4a0ea2331895acead457
7
- data.tar.gz: 26ed039f785e8b6aae0268b828cf220c3f508601985e1122b8fdd7ac6d78f8183ad922e22e9dfb7594534223dedc5f45492b4f4f725899c7efbd7f438449329e
6
+ metadata.gz: 52fce3b9f48a518c884ed662574fd5f3159c87965f3390bc0f0a9f08e5f70af36338929287e5df615d691f03faede0df45d4ac3ef84d401fc00e0bd1b10e32b1
7
+ data.tar.gz: 5044bf1bf05305676fe67c1f8464be640dcfb3dcffcf092e284741a7a43c5155e6c00b7f52b2fad362a1ee9a936f3d13060f00acd7af5ad73b87e5a13376c048
@@ -7,19 +7,26 @@ module Myun2
7
7
 
8
8
  def initialize(client, *params)
9
9
  @client = client
10
- format(home_timeline).each do |tweet| puts tweet end
10
+ format(home_timeline, *params).each do |tweet| puts tweet end
11
11
  end
12
12
 
13
13
  def home_timeline
14
14
  client.home_timeline
15
15
  end
16
16
 
17
- def format(timeline)
17
+ def format(timeline, *params)
18
18
  timeline.map do |t|
19
- u = t["user"]
20
- user_name = u["name"]
21
- text = t["text"]
22
- "<#{user_name}>: #{text[0..30]}"
19
+ u = t['user']
20
+ user_name = u['name']
21
+ screen_name = u['screen_name']
22
+ text = t['text']
23
+
24
+ if params && params[0].include?('l')
25
+ datetime = t['created_at']
26
+ "#{datetime} <#{screen_name}:#{user_name}>: #{text}"
27
+ else
28
+ "<#{user_name}>: #{text[0..30]}"
29
+ end
23
30
  end
24
31
  end
25
32
  end
@@ -1,5 +1,5 @@
1
1
  module Myun2
2
2
  class TwitterShell
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twsh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - myun2