Sha256: 80f23f5d58bea37d8309d87b67b4d853ac2889bd20f1157dfb5c0c856f09dd39

Contents?: true

Size: 345 Bytes

Versions: 8

Compression:

Stored size: 345 Bytes

Contents

module Bogus
  class InstanceMethods
    extend Takes
    takes :klass

    def all
      klass.instance_methods - Object.instance_methods
    end

    def get(name)
      klass.instance_method(name)
    end

    def remove(name)
      klass.send(:undef_method, name)
    end

    def define(body)
      klass.class_eval(body)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bogus-0.1.7 lib/bogus/fakes/instance_methods.rb
bogus-0.1.6 lib/bogus/fakes/instance_methods.rb
bogus-0.1.5 lib/bogus/fakes/instance_methods.rb
bogus-0.1.4 lib/bogus/fakes/instance_methods.rb
bogus-0.1.3 lib/bogus/instance_methods.rb
bogus-0.1.2 lib/bogus/instance_methods.rb
bogus-0.1.1 lib/bogus/instance_methods.rb
bogus-0.1.0 lib/bogus/instance_methods.rb