extface 0.5.7 → 0.5.8

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: fc29ec65cacca65fcfa861bef03b1947a067bbfe
4
- data.tar.gz: 786a71ba8ce3727d1fdce4f7807c0f7ecb7e5d21
3
+ metadata.gz: 22d78c8ea31d91b6bab4004883da84d8a43b1aeb
4
+ data.tar.gz: 1becebfb38a4251d08ad9fab7e99e58f995f3d2b
5
5
  SHA512:
6
- metadata.gz: 8b69c16765372fff5f7d48327376bd6827a3faf445b2122fda3d3eea9d64121462f1b6a212eded4815b582e71f70a59a9d5bccb71ecfcbc813189d47f023b234
7
- data.tar.gz: e5acf21532c7cf12470523c80a4615df1e17874d59e4eaedb42b4bf6d1967b8b0f81d4a785626173dfe8b9953f9b05e43e9a2ac53fa70455230856aae5ff50a9
6
+ metadata.gz: 1a5d69ac6a6de65456ee059d7c1d023b355e2d6488221f4a2fa12e06b95e3f8b486a20201bb6e80bd9684f1df74569fea7a116ab6b77e14d9238489513cbec62
7
+ data.tar.gz: c43640283b80ba3101a7c19e290d35456d45efcd2568715a0d8400838019b7951719542c09ffb7cd120a8422f1330e51ebfe3de388d7bb8a8ee0132a684517cd
@@ -60,29 +60,29 @@ module Extface
60
60
  end
61
61
 
62
62
  def print_edges_row(text1, text2)
63
- print "#{text1} #{text2.rjust(CHAR_COLUMNS - text1.length - 1)}\r\n"
63
+ print "#{text1} #{text2.rjust(char_columns - text1.length - 1)}\r\n"
64
64
  end
65
65
 
66
66
  def print_text_price_row(text, price)
67
67
  rtext = ("%.2f" % price.to_f)
68
- lsize = CHAR_COLUMNS - rtext.length - 1
68
+ lsize = char_columns - rtext.length - 1
69
69
  print "#{text.truncate(lsize).ljust(lsize)} #{rtext}\r\n"
70
70
  end
71
71
 
72
72
  def print_fill_row(pattern)
73
- print "\r\n".rjust(CHAR_COLUMNS+2, pattern)
73
+ print "\r\n".rjust(char_columns + 2, pattern)
74
74
  end
75
75
 
76
76
  def print_rjust_row(text, padstr=' ')
77
- print "#{text.truncate(CHAR_COLUMNS).rjust(CHAR_COLUMNS, padstr)}\r\n"
77
+ print "#{text.truncate(char_columns).rjust(char_columns, padstr)}\r\n"
78
78
  end
79
79
 
80
80
  def print_ljust_row(text, padstr = ' ', margin=0)
81
- print "#{text.truncate(CHAR_COLUMNS - margin).ljust(CHAR_COLUMNS - margin)}\r\n"
81
+ print "#{text.truncate(char_columns - margin).ljust(char_columns - margin)}\r\n"
82
82
  end
83
83
 
84
84
  def print_center_row(text, padstr = ' ')
85
- print "#{text.truncate(CHAR_COLUMNS).center(CHAR_COLUMNS, padstr)}\r\n"
85
+ print "#{text.truncate(char_columns).center(char_columns, padstr)}\r\n"
86
86
  end
87
87
 
88
88
  def printize(bill, detailed = false, payments = true)
@@ -100,6 +100,10 @@ module Extface
100
100
 
101
101
  end
102
102
  end
103
-
103
+
104
+ def char_columns
105
+ self.class::CHAR_COLUMNS
106
+ end
104
107
  end
108
+
105
109
  end
@@ -1,3 +1,3 @@
1
1
  module Extface
2
- VERSION = "0.5.7"
2
+ VERSION = "0.5.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extface
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Vangelov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-31 00:00:00.000000000 Z
11
+ date: 2016-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis