Class Array

  1. lib/will_paginate/core_ext.rb (view online)
Parent: Object

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

  1. include_method?

Public instance methods

include_method? (name)
[show 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