muflax 0.3.17 → 0.3.18

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
  SHA256:
3
- metadata.gz: 067f758885f810a872cd001d1961799426c5011d724a6077a23a0791fe161dd1
4
- data.tar.gz: aec4f274c3aa03600856a7ac234d9735d720890cb09736f39a3a072b2d0d73d2
3
+ metadata.gz: 1a633eb18821a470c9d818d57bcc4406aaf79861522957defd698ce2bfdc4ced
4
+ data.tar.gz: d682e16f1eec598a949b2d22db1dee20a75a1b9cdb9d9e04ff32a37485dd9556
5
5
  SHA512:
6
- metadata.gz: b88e4f79d7128d65296bf34ed3b09d41e475641f550369aaf0ab62eeb10aba788f5bb0545288b478efd0850043998bbceb35c1ee36e926ecc65f566fa5c583cf
7
- data.tar.gz: 1967258499e3387040b36240f823f53b31817f0a67a0294e23d82aa4c6b1836669a5bdd46634e98a29868dc9922d4848cab9c64861aebfa1e5400481e5da596f
6
+ metadata.gz: 102246d9feb7a32a2fee1ce34cad9d6e122e808a53eece94fc9833e1071ff0254a714193c1a1e9511659dbd659084ebb293a090ca477b8c1da1116d59da93d63
7
+ data.tar.gz: aab37b803b43ab5241ab075beecf1c495eb2390e3aa9865c429e27746dc8edaeaa1aeada91035f6987155c9809945a020e05a992471e78b24825d3c160b878fe
checksums.yaml.gz.sig CHANGED
@@ -1 +1,3 @@
1
- �&��d�.�8��j;]J(�Q���P/����d�)&ժ��>��6��;��R�UE��?9/�G)w<�1Oa��l�nUH�m?w=�Ί�����Mg᝔��/s�9 ��8UF�Yo�-^i�~Z#����׍I٠��U.[M�4��#�$y��k��<�u���R�f��i�=�njDz����1
1
+ �'#�;�X��7������o!�V�П3
2
+ ��4��U�"X������a�����s] ��ƙ�Ż�����[ԝ����r9��k
3
+ ���9 ��<����~#�r)#���5"4����y���A����Wñ4YX������d�*j��Q���YTb���9m[�^
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- muflax (0.3.17)
4
+ muflax (0.3.18)
5
5
  awesome_print (~> 1)
6
6
  debug_inspector (~> 0.0)
7
7
  highline (< 1.7)
data/lib/muflax/align.rb CHANGED
@@ -39,9 +39,9 @@ end
39
39
  class Array
40
40
  def align str="\t", alignment: :left, force: false
41
41
  just_function = case alignment
42
- when :left ; Proc.new{|e,l,_c| e.ljust(l) }
43
- when :right ; Proc.new{|e,l,_c| e.rjust(l) }
44
- when :center ; Proc.new{|e,l,_c| e.center(l) }
42
+ when :left ; Proc.new{|e,l,_c| e.ljust l }
43
+ when :right ; Proc.new{|e,l,_c| e.rjust l }
44
+ when :center ; Proc.new{|e,l,_c| e.center l }
45
45
  when Proc ; alignment
46
46
  else
47
47
  raise "invalid alignment: #{alignment}"
@@ -50,11 +50,10 @@ class Array
50
50
  # split all lines
51
51
  lines = []
52
52
  columns = 0
53
- rx = /[ ]+#{str}/ if force
53
+ rx = force ? /[ ]*#{str}/ : str
54
54
 
55
55
  self.each do |line|
56
- line .gsub! rx, str if force
57
- line = line.split(str, -1)
56
+ line = line.split(rx, -1)
58
57
  lines << line
59
58
  columns = [columns, line.size].max
60
59
  end
@@ -79,18 +78,4 @@ class Array
79
78
 
80
79
  lines
81
80
  end
82
-
83
- def align! str=" ", alignment: :left
84
- self.replace(self.align(str, alignment: alignment))
85
- end
86
- end
87
-
88
- class String
89
- def align str=" ", alignment: :left
90
- self.split("\n").align(str, alignment: alignment).join("\n")
91
- end
92
-
93
- def align! str=" ", alignment: :left
94
- self.replace(self.align(str, aligment: alignment))
95
- end
96
81
  end
data/muflax.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "muflax"
3
- s.version = "0.3.17"
3
+ s.version = "0.3.18"
4
4
 
5
5
  s.authors = ["muflax"]
6
6
  s.summary = "muflax standard library"
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- 56�hXA�ҷ�TP0N��DүLK��2})�y�]q.��}9R�8��.fɟ�j+�!kJI�A�V�E�����ȥvh<�K[��t���>�k��_T'E�!\�?kNА%6[ɱ����!��;��Ʈ��dwK Ӿ���/oWR�.�1�`�o-��A<좌���D��4^�9Z��C�כ�4%��=��v��R.h2be"�<)�b��E͆��O�e�)_n������c��ip|t*�ރ��<r;1��
1
+ Zu�|�3�D�|z<�%�B����[?d]�0��T(���qjF"<�)�o��.�h��|'%���?m{$��ƕ�~;�`:�؍G��4?LBS#V�,x��`�� �|�Ћ������8�H�eNr�BV*�++�� x��yS��1w�*�cy9GaX;[ar��L���x��²x {�1 ��dk�:ׇ�d44C܎��HvGB^C����+��? w$�G
2
+ �݇�SBKZY��֙�����IϚ��.*Q%XJ�W2�
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muflax
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.17
4
+ version: 0.3.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - muflax
metadata.gz.sig CHANGED
Binary file