org_tp 0.0.11 → 0.0.12

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: 1e234454b6b0fd9d56f42dd6a0d768790334ab34
4
- data.tar.gz: 49d4c34b17d000c9011890f46bf45f7f3af0d651
3
+ metadata.gz: 8d54540c561e7433f373842cf671decf365f0c7f
4
+ data.tar.gz: 5541d5b5074820e452a6e45e3bd1c6bc679ba217
5
5
  SHA512:
6
- metadata.gz: 819710ed0d778e6523ee7941bb020967002141a5a84fe6f7430cd17e1cc7bc98e1f8a2746e897e74d68683df592471cf404bde37cfc672f3ec29fcd69e3fd295
7
- data.tar.gz: 42d9afde6a537e26f126a5dd0754a1953f95c77e3bb61d28927b392510bf0daa6ffee095fcace6ed95134971a859685df85896441081b283aade58f880452161
6
+ metadata.gz: 86ca520eaed9ab8f8e8cfba447b31f7852741690a1e26fa726dbfca6a774cd786e2a0cd7c07d14a2c2a0f385a26bafb69d722933df9795595e246613f85c61d2
7
+ data.tar.gz: 63c6a43f9348768c678ff47fd7944c0c92ea8ff4e250b50ef5113fee8d499b17240091dd65b833b402103128bd9ce0559c49097cb2d5d626f4411f493657b8e2
data/README.org CHANGED
@@ -36,7 +36,7 @@ tp [{id: 1, name: 'alice'}, {id: 2, name: 'bob'}]
36
36
  #+BEGIN_SRC ruby
37
37
  tp({id: 1, name: 'alice'})
38
38
  # >> |------+-------|
39
- # >> | id | 1 |
39
+ # >> | id | 1 |
40
40
  # >> | name | alice |
41
41
  # >> |------+-------|
42
42
  #+END_SRC
@@ -102,7 +102,7 @@ tp User.limit(1)
102
102
  #+BEGIN_SRC ruby
103
103
  tp User.first
104
104
  # >> |------+-------|
105
- # >> | id | 1 |
105
+ # >> | id | 1 |
106
106
  # >> | name | alice |
107
107
  # >> |------+-------|
108
108
  #+END_SRC
@@ -119,6 +119,31 @@ tp ActiveRecord::Base.connection.select_all('SELECT * FROM users')
119
119
  # >> |----+-------|
120
120
  #+END_SRC
121
121
 
122
+ ** Various alias
123
+
124
+ *pt* and *tt* are alias of *tp*
125
+
126
+ #+BEGIN_SRC ruby
127
+ pt :ok
128
+ # >> |----|
129
+ # >> | ok |
130
+ # >> |----|
131
+ #+END_SRC
132
+
133
+ #+BEGIN_SRC ruby
134
+ tp :ok
135
+ # >> |----|
136
+ # >> | ok |
137
+ # >> |----|
138
+ #+END_SRC
139
+
140
+ #+BEGIN_SRC ruby
141
+ tt :ok
142
+ # >> |----|
143
+ # >> | ok |
144
+ # >> |----|
145
+ #+END_SRC
146
+
122
147
  ** How to table as string
123
148
 
124
149
  Use to_t method.
@@ -174,15 +199,15 @@ tp [{id: 1, name: 'alice'}, {id: 2, name: 'bob'}], intersection: '|', cover: fal
174
199
  #+BEGIN_SRC ruby
175
200
  tp OrgTp.default_options
176
201
  # >> |-------------------+-------|
177
- # >> | markdown | false |
178
- # >> | header | |
179
- # >> | cover | true |
180
- # >> | vertical | | |
181
- # >> | intersection | + |
202
+ # >> | markdown | false |
203
+ # >> | header | |
204
+ # >> | cover | true |
205
+ # >> | vertical | | |
206
+ # >> | intersection | + |
182
207
  # >> | intersection_both | | |
183
- # >> | horizon | - |
184
- # >> | padding | |
185
- # >> | in_code | UTF-8 |
208
+ # >> | horizon | - |
209
+ # >> | padding | |
210
+ # >> | in_code | UTF-8 |
186
211
  # >> |-------------------+-------|
187
212
 
188
213
  tp 1
@@ -1,8 +1,9 @@
1
1
  $LOAD_PATH << '../lib'
2
2
  require 'org_tp'
3
3
 
4
- pt 1
5
- tp 1
4
+ pt :ok
5
+ tp :ok
6
+ tt :ok
6
7
  tp 'foo'
7
8
  tp :foo
8
9
  tp [:alice, :bob]
@@ -11,12 +12,15 @@ tp [{id: 1, name: 'alice'}, {id: 2, name: 'bob'}]
11
12
  puts [{id: 1, name: 'alice'}, {id: 2, name: 'bob'}].to_t
12
13
  puts [{'a': ['a']}].to_t
13
14
  puts [{'a': {'a': 1}}].to_t
14
- # >> |---|
15
- # >> | 1 |
16
- # >> |---|
17
- # >> |---|
18
- # >> | 1 |
19
- # >> |---|
15
+ # >> |----|
16
+ # >> | ok |
17
+ # >> |----|
18
+ # >> |----|
19
+ # >> | ok |
20
+ # >> |----|
21
+ # >> |----|
22
+ # >> | ok |
23
+ # >> |----|
20
24
  # >> |-----|
21
25
  # >> | foo |
22
26
  # >> |-----|
@@ -11,24 +11,24 @@ tp OrgTp.default_options
11
11
  # >> | 1 |
12
12
  # >> +---+
13
13
  # >> |-------------------+-------|
14
- # >> | markdown | false |
15
- # >> | header | |
16
- # >> | cover | true |
17
- # >> | vertical | | |
18
- # >> | intersection | + |
14
+ # >> | markdown | false |
15
+ # >> | header | |
16
+ # >> | cover | true |
17
+ # >> | vertical | | |
18
+ # >> | intersection | + |
19
19
  # >> | intersection_both | | |
20
- # >> | horizon | - |
21
- # >> | padding | |
22
- # >> | in_code | UTF-8 |
20
+ # >> | horizon | - |
21
+ # >> | padding | |
22
+ # >> | in_code | UTF-8 |
23
23
  # >> |-------------------+-------|
24
24
  # >> +-------------------+-------+
25
- # >> | markdown | false |
26
- # >> | header | |
27
- # >> | cover | true |
28
- # >> | vertical | | |
29
- # >> | intersection | + |
25
+ # >> | markdown | false |
26
+ # >> | header | |
27
+ # >> | cover | true |
28
+ # >> | vertical | | |
29
+ # >> | intersection | + |
30
30
  # >> | intersection_both | + |
31
- # >> | horizon | - |
32
- # >> | padding | |
33
- # >> | in_code | UTF-8 |
31
+ # >> | horizon | - |
32
+ # >> | padding | |
33
+ # >> | in_code | UTF-8 |
34
34
  # >> +-------------------+-------+
@@ -1,3 +1,3 @@
1
1
  module OrgTp
2
- VERSION = '0.0.11'
2
+ VERSION = '0.0.12'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: org_tp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - akicho8
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-23 00:00:00.000000000 Z
11
+ date: 2017-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport