Sha256: 83255c09aadae046e8b3a0f6a81be50e65b2be33e8c53ff367afa50accacf393

Contents?: true

Size: 558 Bytes

Versions: 111

Compression:

Stored size: 558 Bytes

Contents

# encoding: utf-8

# Object
class Object
  # Get self define methods.
  #
  #   class SampleClass < String
  #     def public_hello
  #       "public hello"
  #     end
  #
  #     protected
  #
  #     def protected_hello
  #       "protected hello"
  #     end
  #
  #     private
  #
  #     def private_hello
  #       "private hello"
  #     end
  #   end
  #
  #   SampleClass.new.my_methods # => [:public_hello, :protected_hello, :private_hello]
  def my_methods
    public_methods(false) + protected_methods(false) + private_methods(false)
  end
end

Version data entries

111 entries across 111 versions & 1 rubygems

Version Path
tbpgr_utils-0.0.111 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.110 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.109 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.108 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.107 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.106 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.105 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.104 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.103 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.102 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.101 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.100 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.99 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.98 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.97 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.96 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.95 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.94 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.93 lib/open_classes/object/my_methods.rb
tbpgr_utils-0.0.92 lib/open_classes/object/my_methods.rb