tbpgr_utils 0.0.116 → 0.0.117

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +51 -0
  3. data/README.md +13 -1
  4. data/Rakefile +8 -8
  5. data/lib/attributes_initializable.rb +3 -3
  6. data/lib/eval_helper/attr_init_class_code.rb +1 -1
  7. data/lib/eval_helper/times_code.rb +2 -2
  8. data/lib/markdown/heading.rb +32 -32
  9. data/lib/open_classes/array/kernel_send.rb +15 -0
  10. data/lib/open_classes/array/to_table.rb +1 -1
  11. data/lib/open_classes/array.rb +1 -0
  12. data/lib/open_classes/kernel/aa_ancestors.rb +16 -16
  13. data/lib/open_classes/kernel/p_evals.rb +42 -42
  14. data/lib/open_classes/string/heading_helper.rb +1 -1
  15. data/lib/open_classes/string/stripe.rb +1 -1
  16. data/lib/open_classes/string/to_hatena_heading.rb +35 -35
  17. data/lib/open_classes/string/to_markdown_heading.rb +37 -37
  18. data/lib/open_classes/string/to_space2_heading.rb +35 -35
  19. data/lib/open_classes/string/to_space4_heading.rb +35 -35
  20. data/lib/open_classes/string/to_tab_heading.rb +35 -35
  21. data/lib/simple_tournament.rb +57 -57
  22. data/lib/tbpgr_utils/version.rb +1 -1
  23. data/rubocop-todo.yml +33 -33
  24. data/spec/markdown/heading_spec.rb +4 -4
  25. data/spec/markdown/ol_spec.rb +1 -1
  26. data/spec/markdown/ul_spec.rb +1 -1
  27. data/spec/open_classes/array/kernel_send_spec.rb +43 -0
  28. data/spec/open_classes/array/together_at_spec.rb +61 -61
  29. data/spec/open_classes/array/together_clear_spec.rb +51 -51
  30. data/spec/open_classes/array/together_concat_spec.rb +53 -53
  31. data/spec/open_classes/array/together_delete_at_spec.rb +78 -78
  32. data/spec/open_classes/array/together_delete_if_spec.rb +61 -61
  33. data/spec/open_classes/array/together_delete_spec.rb +80 -80
  34. data/spec/open_classes/array/together_fill_spec.rb +79 -79
  35. data/spec/open_classes/array/together_map_spec.rb +171 -171
  36. data/spec/open_classes/array/together_spec.rb +51 -51
  37. data/spec/open_classes/array/together_with_index_spec.rb +51 -51
  38. data/spec/open_classes/object/any_of_spec.rb +72 -72
  39. data/spec/set_variables_code_spec.rb +2 -1
  40. data/tbpgr_utils.gemspec +27 -27
  41. metadata +41 -26
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 813189dd7e2699c513dae05b50d5f841d6e4a7b1
4
+ data.tar.gz: 6be348d263542c013e45cc81e80475397b386f4b
5
+ SHA512:
6
+ metadata.gz: e1479071b4c5feec294716ce25aad060e9f7f8559398234a2af3b1bc913a09355f3df92bcf170654859f4556bbf7e8047f93933f7c636a0d9d3b0d1b6f08c4b5
7
+ data.tar.gz: bf240a5a702bb16b636815c8aae1adb783193a16550cebbe3b764aa1fc4ea4b309bdf7a591888b3b6eeee1f853ee93e6ac9166154627d35f9fc989bd8da5931f
data/.rubocop.yml CHANGED
@@ -4,3 +4,54 @@ LineLength:
4
4
  Enabled: false
5
5
  Semicolon:
6
6
  Enabled: false
7
+
8
+ AccessModifierIndentation:
9
+ Enabled: false
10
+
11
+ AsciiComments:
12
+ Enabled: false
13
+
14
+ Documentation:
15
+ Enabled: false
16
+
17
+ EmptyLineBetweenDefs:
18
+ Enabled: false
19
+
20
+ EmptyLines:
21
+ Enabled: false
22
+
23
+ EmptyLinesAroundAccessModifier:
24
+ Enabled: false
25
+
26
+ Encoding:
27
+ Enabled: false
28
+
29
+ Eval:
30
+ Enabled: false
31
+
32
+ Lambda:
33
+ Enabled: false
34
+
35
+ MethodLength:
36
+ Enabled: false
37
+
38
+ NestedTernaryOperator:
39
+ Enabled: false
40
+
41
+ ParenthesesAroundCondition:
42
+ Enabled: false
43
+
44
+ RaiseArgs:
45
+ Enabled: false
46
+
47
+ ShadowingOuterLocalVariable:
48
+ Enabled: false
49
+
50
+ UselessAssignment:
51
+ Enabled: false
52
+
53
+ WordArray:
54
+ Enabled: false
55
+
56
+ OpMethod:
57
+ Enabled: false
data/README.md CHANGED
@@ -24,7 +24,8 @@ Or install it yourself as:
24
24
  ### List
25
25
  | class/module/method | mean |
26
26
  |:----------- |:------------ |
27
- |[TbpgrUtils Array#>>](#array) |alias of map(&:method_symbol) |
27
+ |[TbpgrUtils Array#>>](#array) |alias of map(&:method_symbol) |
28
+ |[TbpgrUtils Array#kernel_send](#arraykernel_send) |alias of map {|v|send :some_kernel_method, v} |
28
29
  |[TbpgrUtils Array#to_table](#arrayto_table) |Array(Array, Array...) to table format. |
29
30
  |[TbpgrUtils Array#to_html_table](#arrayto_html_table) |Array(Array, Array...) to html table format. |
30
31
  |[TbpgrUtils Array#together](#arraytogether) |loop all arrays by block |
@@ -167,6 +168,16 @@ require 'tbpgr_utils'
167
168
 
168
169
  [back to list](#list)
169
170
 
171
+ ### Array#kernel_send
172
+ ~~~ruby
173
+ require 'tbpgr_utils'
174
+ [*1..3].kernel_send:Rational # => [(1/1), (2/1), (3/1)]
175
+ [*1..3].kernel_send:print # => 123
176
+ [*65..68].kernel_send :putc # => ABCD
177
+ ~~~
178
+
179
+ [back to list](#list)
180
+
170
181
  ### Array#to_table
171
182
  ~~~ruby
172
183
  require 'tbpgr_utils'
@@ -3524,6 +3535,7 @@ if you are Sublime Text2 user, you can use snippet for TbpgrUtils.
3524
3535
  https://github.com/tbpgr/tbpgr_utils_snippets
3525
3536
 
3526
3537
  ## History
3538
+ * version 0.0.117 : add Array#kernel_send
3527
3539
  * version 0.0.116 : add Array#>>
3528
3540
  * version 0.0.115 : add MarkdownString#codes
3529
3541
  * version 0.0.114 : add MarkdownString#code
data/Rakefile CHANGED
@@ -1,8 +1,8 @@
1
- require "bundler/gem_tasks"
2
- require 'rspec/core'
3
- require 'rspec/core/rake_task'
4
- task :default => [:spec]
5
-
6
- RSpec::Core::RakeTask.new(:spec) do |spec|
7
- spec.pattern = 'spec/**/*_spec.rb'
8
- end
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core'
3
+ require 'rspec/core/rake_task'
4
+ task default: [:spec]
5
+
6
+ RSpec::Core::RakeTask.new(:spec) do |spec|
7
+ spec.pattern = 'spec/**/*_spec.rb'
8
+ end
@@ -47,16 +47,16 @@ module AttributesInitializable
47
47
  def generate_attr(symbols, type)
48
48
  results = symbols.reduce([]) do |results, sym|
49
49
  fail TypeError, "invalid type #{sym.class}. you have to use Symbol" unless sym.class == Symbol
50
- results << ":#{sym.to_s}"
50
+ results << ":#{sym}"
51
51
  end
52
- class_eval "attr_#{type.to_s} #{results.join(',')}"
52
+ class_eval "attr_#{type} #{results.join(',')}"
53
53
  end
54
54
 
55
55
  def generate_initializer(symbols)
56
56
  instance_eval do
57
57
  define_method :initialize do |values = nil, &block|
58
58
  return block.call self if block
59
- symbols.each { |symbol|instance_variable_set("@#{symbol.to_s}", values[symbol]) }
59
+ symbols.each { |symbol|instance_variable_set("@#{symbol}", values[symbol]) }
60
60
  end
61
61
  end
62
62
  end
@@ -29,7 +29,7 @@ module EvalHelper
29
29
  # end
30
30
  #
31
31
  def attr_init_class_code(class_name, fields)
32
- tmp_fields = fields.map { |v|":#{v.to_s}" }.join(', ')
32
+ tmp_fields = fields.map { |v|":#{v}" }.join(', ')
33
33
  <<-EOS
34
34
  require 'attributes_initializable'
35
35
 
@@ -49,10 +49,10 @@ module EvalHelper
49
49
  # end
50
50
  #
51
51
  def times_code(number, proc)
52
- return "#{number.to_s}.times { |i| #{proc} }" if proc.count('\n') == 0
52
+ return "#{number}.times { |i| #{proc} }" if proc.count('\n') == 0
53
53
  indented = proc.split('\n').reduce([]) { |ret, v|ret << " #{v}" ; ret }.join("\n")
54
54
  <<-EOS
55
- #{number.to_s}.times do |i|
55
+ #{number}.times do |i|
56
56
  #{indented}
57
57
  end
58
58
  EOS
@@ -1,32 +1,32 @@
1
- # encoding: utf-8
2
-
3
- class MarkdownString
4
- class << self
5
- # Return markdown heading level1-6 from text
6
- #
7
- # === Example
8
- #
9
- # MarkdownString.heading1("title") # => "# title"
10
- # MarkdownString.heading2("title") # => "## title"
11
- # MarkdownString.heading3("title") # => "### title"
12
- # MarkdownString.heading4("title") # => "#### title"
13
- # MarkdownString.heading5("title") # => "##### title"
14
- # MarkdownString.heading6("title") # => "###### title"
15
- # MarkdownString.heading1("") # => "# "
16
- # MarkdownString.heading1(nil) # => "# "
17
- # MarkdownString.heading1(12345) # => "# 12345"
18
- #
19
- [*1..6].each do |i|
20
- define_method "heading#{i.to_s}".to_sym do |text|
21
- heading(text, i)
22
- end
23
- end
24
- end
25
-
26
- private
27
- def self.heading(text, level)
28
- return '#' * level + ' ' if text.nil?
29
- return '#' * level + ' ' if text.respond_to?(:empty) && text.empty?
30
- '#' * level + " #{text.to_s}"
31
- end
32
- end
1
+ # encoding: utf-8
2
+
3
+ class MarkdownString
4
+ class << self
5
+ # Return markdown heading level1-6 from text
6
+ #
7
+ # === Example
8
+ #
9
+ # MarkdownString.heading1("title") # => "# title"
10
+ # MarkdownString.heading2("title") # => "## title"
11
+ # MarkdownString.heading3("title") # => "### title"
12
+ # MarkdownString.heading4("title") # => "#### title"
13
+ # MarkdownString.heading5("title") # => "##### title"
14
+ # MarkdownString.heading6("title") # => "###### title"
15
+ # MarkdownString.heading1("") # => "# "
16
+ # MarkdownString.heading1(nil) # => "# "
17
+ # MarkdownString.heading1(12345) # => "# 12345"
18
+ #
19
+ [*1..6].each do |i|
20
+ define_method "heading#{i}".to_sym do |text|
21
+ heading(text, i)
22
+ end
23
+ end
24
+ end
25
+
26
+ private
27
+ def self.heading(text, level)
28
+ return '#' * level + ' ' if text.nil?
29
+ return '#' * level + ' ' if text.respond_to?(:empty) && text.empty?
30
+ '#' * level + " #{text}"
31
+ end
32
+ end
@@ -0,0 +1,15 @@
1
+ # encoding: utf-8
2
+
3
+ # Array
4
+ class Array
5
+ # alias of map {|v|send :some_kernel_method, v}
6
+ #
7
+ # === Example
8
+ #
9
+ # [*1..3].kernel_send:Rational # => [(1/1), (2/1), (3/1)]
10
+ #
11
+ def kernel_send(method_name)
12
+ return self unless [Symbol, String].include? method_name.class
13
+ map { |v|send method_name.to_sym, v }
14
+ end
15
+ end
@@ -16,7 +16,7 @@ class Array
16
16
  def to_table(position = :right)
17
17
  ret = reduce([]) do |rets, lines|
18
18
  ret = lines.reduce([]) { |ret, column|ret << column; ret }
19
- rets << "|#{ret.join("|")}|"
19
+ rets << "|#{ret.join('|')}|"
20
20
  end.join("\n") + "\n"
21
21
  ret.justify_table(position)
22
22
  end
@@ -1,5 +1,6 @@
1
1
  # encoding: utf-8
2
2
  require 'open_classes/array/gte_gte'
3
+ require 'open_classes/array/kernel_send'
3
4
  require 'open_classes/array/to_html_table'
4
5
  require 'open_classes/array/to_table'
5
6
  require 'open_classes/array/together'
@@ -47,24 +47,24 @@ module Kernel
47
47
 
48
48
  private
49
49
 
50
- def max_size_class
51
- ancestors.max_by { |v|v.to_s.size }
52
- end
50
+ def max_size_class
51
+ ancestors.max_by { |v|v.to_s.size }
52
+ end
53
53
 
54
- def centered_ancestors(max)
55
- ancestors.reverse.map { |v|v.to_s.center max }
56
- end
54
+ def centered_ancestors(max)
55
+ ancestors.reverse.map { |v|v.to_s.center max }
56
+ end
57
57
 
58
- def surrounded_ancestors(ca)
59
- ca.reduce([]) { |ret, k|ret << k.surround }
60
- end
58
+ def surrounded_ancestors(ca)
59
+ ca.reduce([]) { |ret, k|ret << k.surround }
60
+ end
61
61
 
62
- def connected_box_ancestors(ba, max)
63
- ba.join(ancestors_connector(max))
64
- end
62
+ def connected_box_ancestors(ba, max)
63
+ ba.join(ancestors_connector(max))
64
+ end
65
65
 
66
- def ancestors_connector(max)
67
- connector = '|'.rjust((max + 2) / 2)
68
- "\n#{connector}\n"
69
- end
66
+ def ancestors_connector(max)
67
+ connector = '|'.rjust((max + 2) / 2)
68
+ "\n#{connector}\n"
69
+ end
70
70
  end
@@ -1,42 +1,42 @@
1
- # encoding: utf-8
2
-
3
- # Kernel
4
- module Kernel
5
- # Print code + eval result
6
- #
7
- # print_eval 8/4, binding # => 8/4 # => 2
8
- # message = 'msg';print_eval "hoge-#{message}", binding # => "hoge-#{message}" # => "hoge-msg"
9
- def print_eval(code, binding)
10
- print exec_eval code, binding
11
- end
12
-
13
- # Puts code + eval result
14
- #
15
- # puts_eval 8/4, binding # => 8/4 # => 2\n
16
- # message = 'msg';puts_eval "hoge-#{message}", binding # => "hoge-#{message}" # => "hoge-msg"\n
17
- def puts_eval(code, binding)
18
- puts exec_eval code, binding
19
- end
20
-
21
- # Puts each-line-code + eval result
22
- #
23
- # code
24
- # message = 'msg'
25
- # puts_eval binding, <<-EOS
26
- # "hoge-#{message}1"
27
- # "hoge-#{message}2"
28
- # EOS
29
- #
30
- # result
31
- # "hoge-#{message}1" # => "hoge-msg1"\n
32
- # "hoge-#{message}2" # => "hoge-msg2"\n
33
- def bulk_puts_eval(binding, codes)
34
- codes.each_line { |code|puts_eval(code.chop, binding) }
35
- end
36
-
37
- private
38
- def exec_eval(code, binding)
39
- ret = eval code, binding
40
- "#{code} # => #{ret.inspect}"
41
- end
42
- end
1
+ # encoding: utf-8
2
+
3
+ # Kernel
4
+ module Kernel
5
+ # Print code + eval result
6
+ #
7
+ # print_eval 8/4, binding # => 8/4 # => 2
8
+ # message = 'msg';print_eval "hoge-#{message}", binding # => "hoge-#{message}" # => "hoge-msg"
9
+ def print_eval(code, binding)
10
+ print exec_eval code, binding
11
+ end
12
+
13
+ # Puts code + eval result
14
+ #
15
+ # puts_eval 8/4, binding # => 8/4 # => 2\n
16
+ # message = 'msg';puts_eval "hoge-#{message}", binding # => "hoge-#{message}" # => "hoge-msg"\n
17
+ def puts_eval(code, binding)
18
+ puts exec_eval code, binding
19
+ end
20
+
21
+ # Puts each-line-code + eval result
22
+ #
23
+ # code
24
+ # message = 'msg'
25
+ # puts_eval binding, <<-EOS
26
+ # "hoge-#{message}1"
27
+ # "hoge-#{message}2"
28
+ # EOS
29
+ #
30
+ # result
31
+ # "hoge-#{message}1" # => "hoge-msg1"\n
32
+ # "hoge-#{message}2" # => "hoge-msg2"\n
33
+ def bulk_puts_eval(binding, codes)
34
+ codes.each_line { |code|puts_eval(code.chop, binding) }
35
+ end
36
+
37
+ private
38
+ def exec_eval(code, binding)
39
+ ret = eval code, binding
40
+ "#{code} # => #{ret.inspect}"
41
+ end
42
+ end
@@ -8,7 +8,7 @@ module HeadingHelper
8
8
  self_chars = chars
9
9
  level, index, word_ret, ret = 0, 0, [], []
10
10
  self_chars.each_with_index do |v, index|
11
- key_word = v.in? %w{> + ^}
11
+ key_word = v.in? %w(> + ^)
12
12
 
13
13
  if key_word
14
14
  ret << leveled_word(level, word_ret)
@@ -28,7 +28,7 @@ class String
28
28
  # hoge.stripe # => nil
29
29
  #
30
30
  def stripe(cap = :upper_cap)
31
- updowns = %w{upcase downcase}
31
+ updowns = %w(upcase downcase)
32
32
  index = cap == :lower_cap ? 1 : 0
33
33
  chars.reduce([]) do |ret, char|
34
34
  ret << char.send(updowns[index % 2])
@@ -1,35 +1,35 @@
1
- # encoding: utf-8
2
- require 'active_support/core_ext/object/inclusion'
3
- require 'open_classes/string/heading_helper'
4
-
5
- class String
6
- include HeadingHelper
7
- # Hatena
8
- HATENA = '*'
9
-
10
- # create heading string with Emmet-like syntax.
11
- #
12
- # ==== Examples
13
- #
14
- # > case
15
- #
16
- # 'hoge>hige'.to_hatena_heading # => '*hoge\n**hige'
17
- #
18
- # + case
19
- #
20
- # 'hoge+hige'.to_hatena_heading # => '*hoge\n*hige'
21
- #
22
- # ^ case
23
- #
24
- # 'hoge>hige^hege'.to_hatena_heading # => '*hoge\n**hige\n*hege'
25
- #
26
- def to_hatena_heading
27
- heading = to_heading
28
- to_hatena heading
29
- end
30
-
31
- private
32
- def to_hatena(heading)
33
- to_head(heading, HATENA, start_level: 1)
34
- end
35
- end
1
+ # encoding: utf-8
2
+ require 'active_support/core_ext/object/inclusion'
3
+ require 'open_classes/string/heading_helper'
4
+
5
+ class String
6
+ include HeadingHelper
7
+ # Hatena
8
+ HATENA = '*'
9
+
10
+ # create heading string with Emmet-like syntax.
11
+ #
12
+ # ==== Examples
13
+ #
14
+ # > case
15
+ #
16
+ # 'hoge>hige'.to_hatena_heading # => '*hoge\n**hige'
17
+ #
18
+ # + case
19
+ #
20
+ # 'hoge+hige'.to_hatena_heading # => '*hoge\n*hige'
21
+ #
22
+ # ^ case
23
+ #
24
+ # 'hoge>hige^hege'.to_hatena_heading # => '*hoge\n**hige\n*hege'
25
+ #
26
+ def to_hatena_heading
27
+ heading = to_heading
28
+ to_hatena heading
29
+ end
30
+
31
+ private
32
+ def to_hatena(heading)
33
+ to_head(heading, HATENA, start_level: 1)
34
+ end
35
+ end
@@ -1,37 +1,37 @@
1
- # encoding: utf-8
2
- require 'active_support/core_ext/object/inclusion'
3
- require 'open_classes/string/heading_helper'
4
-
5
- class String
6
- include HeadingHelper
7
- # Markdown
8
- MARKDOWN = '#'
9
- # Separator
10
- SEPARATOR = ' '
11
-
12
- # create heading string with Emmet-like syntax.
13
- #
14
- # ==== Examples
15
- #
16
- # > case
17
- #
18
- # 'hoge>hige'.to_markdown_heading # => '# hoge\n## hige'
19
- #
20
- # + case
21
- #
22
- # 'hoge+hige'.to_markdown_heading # => '# hoge\n# hige'
23
- #
24
- # ^ case
25
- #
26
- # 'hoge>hige^hege'.to_markdown_heading # => '# hoge\n## hige\n# hege'
27
- #
28
- def to_markdown_heading
29
- heading = to_heading
30
- to_markdown heading
31
- end
32
-
33
- private
34
- def to_markdown(heading)
35
- to_head(heading, MARKDOWN, separator: SEPARATOR, start_level: 1)
36
- end
37
- end
1
+ # encoding: utf-8
2
+ require 'active_support/core_ext/object/inclusion'
3
+ require 'open_classes/string/heading_helper'
4
+
5
+ class String
6
+ include HeadingHelper
7
+ # Markdown
8
+ MARKDOWN = '#'
9
+ # Separator
10
+ SEPARATOR = ' '
11
+
12
+ # create heading string with Emmet-like syntax.
13
+ #
14
+ # ==== Examples
15
+ #
16
+ # > case
17
+ #
18
+ # 'hoge>hige'.to_markdown_heading # => '# hoge\n## hige'
19
+ #
20
+ # + case
21
+ #
22
+ # 'hoge+hige'.to_markdown_heading # => '# hoge\n# hige'
23
+ #
24
+ # ^ case
25
+ #
26
+ # 'hoge>hige^hege'.to_markdown_heading # => '# hoge\n## hige\n# hege'
27
+ #
28
+ def to_markdown_heading
29
+ heading = to_heading
30
+ to_markdown heading
31
+ end
32
+
33
+ private
34
+ def to_markdown(heading)
35
+ to_head(heading, MARKDOWN, separator: SEPARATOR, start_level: 1)
36
+ end
37
+ end
@@ -1,35 +1,35 @@
1
- # encoding: utf-8
2
- require 'active_support/core_ext/object/inclusion'
3
- require 'open_classes/string/heading_helper'
4
-
5
- class String
6
- include HeadingHelper
7
- # Space2
8
- SPACE2 = ' '
9
-
10
- # create heading string with Emmet-like syntax.
11
- #
12
- # ==== Examples
13
- #
14
- # > case
15
- #
16
- # 'hoge>hige'.to_space2_heading # => 'hoge\n hige'
17
- #
18
- # + case
19
- #
20
- # 'hoge+hige'.to_space2_heading # => 'hoge\nhige'
21
- #
22
- # ^ case
23
- #
24
- # 'hoge>hige^hege'.to_space2_heading # => 'hoge\n hige\nhege'
25
- #
26
- def to_space2_heading
27
- heading = to_heading
28
- to_space2 heading
29
- end
30
-
31
- private
32
- def to_space2(heading)
33
- to_head(heading, SPACE2)
34
- end
35
- end
1
+ # encoding: utf-8
2
+ require 'active_support/core_ext/object/inclusion'
3
+ require 'open_classes/string/heading_helper'
4
+
5
+ class String
6
+ include HeadingHelper
7
+ # Space2
8
+ SPACE2 = ' '
9
+
10
+ # create heading string with Emmet-like syntax.
11
+ #
12
+ # ==== Examples
13
+ #
14
+ # > case
15
+ #
16
+ # 'hoge>hige'.to_space2_heading # => 'hoge\n hige'
17
+ #
18
+ # + case
19
+ #
20
+ # 'hoge+hige'.to_space2_heading # => 'hoge\nhige'
21
+ #
22
+ # ^ case
23
+ #
24
+ # 'hoge>hige^hege'.to_space2_heading # => 'hoge\n hige\nhege'
25
+ #
26
+ def to_space2_heading
27
+ heading = to_heading
28
+ to_space2 heading
29
+ end
30
+
31
+ private
32
+ def to_space2(heading)
33
+ to_head(heading, SPACE2)
34
+ end
35
+ end