質問編集履歴
3
a
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
|
24
24
|
|
25
|
-
```
|
25
|
+
```ruby
|
26
26
|
|
27
27
|
def track_tweet(*words)
|
28
28
|
|
@@ -37,3 +37,7 @@
|
|
37
37
|
end
|
38
38
|
|
39
39
|
```
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
track()の括弧中で上記のことが出来たら良いなと思っているのですが...
|
2
a
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
```
|
10
10
|
|
11
|
-
|
11
|
+
"a", "b", "c"
|
12
12
|
|
13
13
|
```
|
14
14
|
|
1
a
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,8 +8,32 @@
|
|
8
8
|
|
9
9
|
```
|
10
10
|
|
11
|
-
"a", "b", "c"
|
11
|
+
words = "a", "b", "c"
|
12
12
|
|
13
13
|
```
|
14
14
|
|
15
15
|
にワンライナーでしたいのですが良い方法を教えてください。
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
やりたいこととしては、下記のように引数の個数をユーザーに決めてもらうことで
|
20
|
+
|
21
|
+
柔軟なインターフェースにならないかと考えています。
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
```
|
26
|
+
|
27
|
+
def track_tweet(*words)
|
28
|
+
|
29
|
+
client.track("word1", "word2"..) do |status|
|
30
|
+
|
31
|
+
text = status.text
|
32
|
+
|
33
|
+
user = status.user
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
```
|