Parent

Array

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

Public Instance Methods

include_method?(name) click to toggle source
# File lib/will_paginate/core_ext.rb, line 9
def include_method?(name)
  name = name.to_sym
  !!(find { |item| item.to_sym == name })
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.