method_info 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7
1
+ 0.1.8
@@ -12,9 +12,20 @@ module MethodInfo
12
12
  # :protected_methods (default: false)
13
13
  # :private_methods (default: false)
14
14
  # :singleton_methods (default: true)
15
- # :include_name_of_excluded_ancestors (default: true)
16
- # :colors (default: false) TODO: configure colours
15
+ # :include_names_of_excluded_ancestors (default: true)
16
+ # :include_names_of_methodless_ancestors (default: true)
17
+ # :enable_colors (default: false)
18
+ # :class_color Set colour for a line printing out a class (only used when :enable_colors is true)
19
+ # :module_color Set colour for a line printing out a module (only used when :enable_colors is true)
20
+ # :message_color Set colour for a line with a message (only used when :enable_colors is true)
21
+ # :methods_color Set colour for a line with methods (only used when :enable_colors is true)
22
+ # :punctuation_color Set colour for punctuation (only used when :enable_colors is true)
23
+ # :suppress_slowness_warning Does not print out the warning about slowness on older ruby versions (default: false)
17
24
  def self.build(object, options)
25
+ if VERSION < "1.8.7" && !options[:suppress_slowness_warning]
26
+ STDERR.puts "You are using Ruby #{VERSION}, this may take a while. It will be faster for >=1.8.7."
27
+ end
28
+
18
29
  methods = []
19
30
  methods += object.methods if options[:public_methods]
20
31
  methods += object.protected_methods if options[:protected_methods]
@@ -30,7 +30,8 @@ module MethodInfo
30
30
  :protected_methods => false,
31
31
  :singleton_methods => true,
32
32
  :public_methods => true,
33
- :enable_colors => false
33
+ :enable_colors => false,
34
+ :suppress_slowness_warning => false
34
35
  }
35
36
  end
36
37
 
@@ -50,6 +50,7 @@ module MethodInfo
50
50
  default_options[:protected_methods].should == false
51
51
  default_options[:private_methods].should == false
52
52
  default_options[:enable_colors].should == false
53
+ default_options[:suppress_slowness_warning].should == false
53
54
  end
54
55
  end
55
56
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: method_info
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom ten Thij