whats_up 1.1.3 → 1.1.4

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.
data/lib/whats_up.rb CHANGED
@@ -33,25 +33,25 @@ class Object
33
33
  end
34
34
  end
35
35
 
36
- def what_equals(expected_result, *args)
37
- show_methods expected_result, {}, *args
36
+ def what_equals(expected_result, *args, &block)
37
+ show_methods expected_result, {}, *args, &block
38
38
  end
39
39
 
40
- def whats_exactly(expected_result, *args)
41
- show_methods expected_result, { force_exact: true }, *args
40
+ def whats_exactly(expected_result, *args, &block)
41
+ show_methods expected_result, { force_exact: true }, *args, &block
42
42
  end
43
43
 
44
- def what_matches(expected_result, *args)
45
- show_methods expected_result, { force_regex: true }, *args
44
+ def what_matches(expected_result, *args, &block)
45
+ show_methods expected_result, { force_regex: true }, *args, &block
46
46
  end
47
47
 
48
- def what_works_with(*args)
49
- show_methods nil, { show_all: true }, *args
48
+ def what_works_with(*args, &block)
49
+ show_methods nil, { show_all: true }, *args, &block
50
50
  end
51
51
  alias :what_works :what_works_with
52
52
 
53
- def whats_not_blank_with(*args)
54
- show_methods nil, { show_all: true, exclude_blank: true }, *args
53
+ def whats_not_blank_with(*args, &block)
54
+ show_methods nil, { show_all: true, exclude_blank: true }, *args, &block
55
55
  end
56
56
  alias :whats_not_blank :whats_not_blank_with
57
57
 
@@ -65,9 +65,9 @@ class Object
65
65
 
66
66
  private
67
67
 
68
- def show_methods(expected_result, opts = {}, *args)
68
+ def show_methods(expected_result, opts = {}, *args, &block)
69
69
  @args = args unless args.empty?
70
- WhatsUp::MethodFinder.show(self, expected_result, opts, *@args)
70
+ WhatsUp::MethodFinder.show(self, expected_result, opts, *@args, &block)
71
71
  end
72
72
  end
73
73
 
@@ -65,10 +65,10 @@ module WhatsUp
65
65
  # Pretty-prints the results of the previous method
66
66
  def show(an_object, expected_result, opts = {}, *args, &block)
67
67
  opts = {
68
- force_regex: false,
68
+ exclude_blank: false,
69
69
  force_exact: false,
70
- show_all: false,
71
- exclude_blank: false
70
+ force_regex: false,
71
+ show_all: false
72
72
  }.merge(opts)
73
73
 
74
74
  found = find(an_object, expected_result, opts, *args, &block)
@@ -1,4 +1,4 @@
1
1
  module WhatsUp
2
2
  # The current version
3
- VERSION = "1.1.3"
3
+ VERSION = "1.1.4"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whats_up
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: