質問編集履歴

2

add class

2018/08/01 04:41

投稿

dossy
dossy

スコア109

test CHANGED
File without changes
test CHANGED
@@ -66,6 +66,8 @@
66
66
 
67
67
  ```
68
68
 
69
+ class hogehoge
70
+
69
71
  def aaa
70
72
 
71
73
  DB.create

1

例、追加

2018/08/01 04:41

投稿

dossy
dossy

スコア109

test CHANGED
File without changes
test CHANGED
@@ -28,4 +28,60 @@
28
28
 
29
29
  ```
30
30
 
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+ 例えば、
40
+
41
+ ```
42
+
43
+ class hogehoge
44
+
45
+
46
+
47
+ def aaa
48
+
49
+ db = DB.create(params)
50
+
51
+ binding.pry
52
+
53
+ db.all
54
+
55
+ binding.pry
56
+
57
+ end
58
+
59
+ ```
60
+
61
+ こんな記述は、まかり通るのか?
62
+
63
+ それとも、
64
+
65
+ 別のdefにbinding.pryを使うことがあると言う認識でいいのでしょうか?
66
+
67
+ ```
68
+
69
+ def aaa
70
+
71
+ DB.create
72
+
73
+ binding.pry
74
+
75
+ end
76
+
77
+ +
78
+
79
+ def bbb
80
+
81
+ binding.pry
82
+
83
+ end
84
+
85
+ ```
86
+
31
87
  宜しくお願いします。