Class Array
In: lib/will_paginate/core_ext.rb
Parent: Object
Array dot/f_7.png

helper to check for method existance in ruby 1.8- and 1.9-compatible way because `methods`, `instance_methods` and others return strings in 1.8 and symbols in 1.9

  ['foo', 'bar'].include_method?(:foo) # => true

Methods

Public Instance methods

[Source]

    # File lib/will_paginate/core_ext.rb, line 9
 9:   def include_method?(name)
10:     name = name.to_sym
11:     !!(find { |item| item.to_sym == name })
12:   end

[Validate]