ruby_bots 0.0.17 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b39c819ac52b84e9dd2b380d63532df4ee08a0c668f5fcec2eaa59db2270652
4
- data.tar.gz: 546368ae3240380c1017dbdd2d11f521e280284858d435f788ec183ecfcdcf4e
3
+ metadata.gz: a079a3af0b9f2b688aa2bb5d3f59c2936ae02acf1bbe72c24b00c0ba1eb587ab
4
+ data.tar.gz: bde27597290c67b77527fb591f6eae2ce630cf9934c6d503f5a9a7152ee29e7f
5
5
  SHA512:
6
- metadata.gz: 24e5d93a84405c5e7a57ffd1877bff805c52067f3152e14019302535750bbbce4760c2e0871cc9fef12e694ff311d109da65256c88bb9532532a79e884faa858
7
- data.tar.gz: 932623e0f83638a893867f7559173672b2d25e4eb9554c6c177b07a02e5d34ee91d8826a6e9b6066d1239f5f6f6955106e2d64c77a506425ed6253c06e08b6c5
6
+ metadata.gz: afa58f62e18ebd31ff703749a5bf786b8e7d7174972cd55c2b83f35778d348911405ab3d412659f3db9911d68433474664fee870ed909152bbe45760d10fe69d
7
+ data.tar.gz: 9296e14a7827194f85bde5c40eee8be47c9f86869ab3c6a5004739dc8286b273dfbad9a0828724e27aaf471dacd7df49cf30f8fcd4410c721c685378b0c10141
@@ -13,34 +13,34 @@ module RubyBots
13
13
  end
14
14
 
15
15
  def self.validate_inputs(method)
16
- @@input_validators ||= []
17
- @@input_validators << method
16
+ @input_validators ||= []
17
+ @input_validators << method
18
18
  end
19
19
 
20
20
  def self.validate_outputs(method)
21
- @@output_validators ||= []
22
- @@output_validators << method
21
+ @output_validators ||= []
22
+ @output_validators << method
23
23
  end
24
24
 
25
25
  def response(input)
26
- @@input_validators ||= []
27
- @@input_validators.each do |validator|
26
+ self.class.input_validators ||= []
27
+ self.class.input_validators.each do |validator|
28
28
  send(validator, input)
29
29
  end
30
30
 
31
- if @errors.empty?
31
+ if self.errors.empty?
32
32
  output = run(input)
33
33
  else
34
- raise RubyBots::Errors::InvalidInputError.new(errors: @errors)
34
+ raise RubyBots::InvalidInputError.new(errors: @errors)
35
35
  end
36
36
 
37
- @@output_validators ||= []
38
- @@output_validators.each do |validator|
37
+ self.class.output_validators ||= []
38
+ self.class.output_validators.each do |validator|
39
39
  send(validator, output)
40
40
  end
41
41
 
42
- if @errors.any?
43
- raise RubyBots::Errors::InvalidOutputError.new(errors: @errors)
42
+ if self.errors.any?
43
+ raise RubyBots::InvalidOutputError.new(errors: @errors)
44
44
  end
45
45
 
46
46
  output
@@ -1,3 +1,3 @@
1
1
  module RubyBots
2
- VERSION = "0.0.17".freeze
2
+ VERSION = "0.0.19".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_bots
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Paulson