arbitrium 1.0.4 → 1.0.5

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: 0eab385a3a3163b18af4dacbe43892551c62f624
4
- data.tar.gz: 92c0fab795482b3cdcd4ed0bbdf9c61b005b4011
3
+ metadata.gz: c2efbfac932311db8e460314e5639ae8963e078c
4
+ data.tar.gz: c911ec4c7753eb79cdc9f034f380f0af39decc60
5
5
  SHA512:
6
- metadata.gz: ca4bc4a1507635d57847fa321c3169c920cf5b049e1c9f0b7d614881fb58b2a59aa0f96fd0683e7f69f641dc692f32438e9a861598b0e4496188d525818345be
7
- data.tar.gz: 62809d19e00b15fc759c438d216eb2d3401c63fd3afe4d1c3483326e0cac302dde004dee7f7f070490fdc9a45082ac5e3af3cf8bbcef318a46e921b3bef33cbe
6
+ metadata.gz: 91a752564c95ed12e83491ce9aa52768ca9025a6882cc724108fe48c696946e092039e559fafcbff6200243533eaa7f051159dcc6214876dc4c0c8bd1b00ec57
7
+ data.tar.gz: 56a4bc60e282a9da760152072ba4941731553fa52ec90cff831f11d585a45da06896a1a2e46f8efb544f8a8315c6a14bf6fd4630795aa3ddd2705738869f84bf
data/README.md CHANGED
@@ -46,7 +46,7 @@ Any deviation from data types will result in an error being raised.
46
46
 
47
47
  What a successful result may look like:
48
48
  ```
49
- result = Arbitrium::Result.new(user.save, user.errors.messages.join(', '), user)
49
+ result = Arbitrium::Result.new(user.save, 'Some yucky error', user)
50
50
 
51
51
  result.successful? # true
52
52
  result.failed? # false
@@ -23,7 +23,7 @@ module Arbitrium
23
23
  File.open(full_path_with_file, 'w') do |file|
24
24
  file.write(<<~EOF
25
25
  require 'arbitrium'
26
-
26
+
27
27
  #{file_header}
28
28
  #{add_spaces} def self.#{method_name}()
29
29
  #{add_spaces} new().#{method_name}
@@ -67,13 +67,17 @@ module Arbitrium
67
67
  end
68
68
 
69
69
  def class_header
70
- module_array.empty? ? "class #{class_name}" : "\n#{add_spaces(module_array.length)} class #{class_name}"
70
+ module_array.empty? ? "class #{class_name}" : "\n#{add_spaces(module_array.length)} class #{class_name}"
71
71
  end
72
72
 
73
- def add_spaces(value = module_array.length)
73
+ def add_spaces(value = modified_module_length)
74
74
  ' ' * value
75
75
  end
76
76
 
77
+ def modified_module_length
78
+ module_array.empty? ? 0 : module_array.length + 1
79
+ end
80
+
77
81
  def class_name
78
82
  class_portion_of_path.split('_').map(&:capitalize).join('')
79
83
  end
@@ -1,3 +1,3 @@
1
1
  module Arbitrium
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arbitrium
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lollar