Sha256: 359814ce8ed79a946a8b78ac26d105b688bf586cca3fbf0f1becacb561e7463e

Contents?: true

Size: 437 Bytes

Versions: 4

Compression:

Stored size: 437 Bytes

Contents

# encoding: utf-8

#= Object
class Object
  #== check boolean type
  def boolean?
    self.is_a?(TrueClass) || self.is_a?(FalseClass)
  end

  #== get self define methods.
  def my_methods
    public_methods(false) + protected_methods(false) + private_methods(false)
  end

  #== if self match any one of args, return true.
  def any_of?(*args)
    args.each {|value|return true if self == value}
    false
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tbpgr_utils-0.0.6 lib/open_classes/object.rb
tbpgr_utils-0.0.5 lib/open_classes/object.rb
tbpgr_utils-0.0.4 lib/open_classes/object.rb
tbpgr_utils-0.0.3 lib/open_classes/object.rb