Sha256: 72011d0521636a4d6310e7a3e43901aa99f3f6adf7ebab6b50f235d4aa6d8f1a

Contents?: true

Size: 352 Bytes

Versions: 3

Compression:

Stored size: 352 Bytes

Contents

module Bogus
  class InstanceMethods
    extend Bogus::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

3 entries across 3 versions & 1 rubygems

Version Path
bogus-0.0.4 lib/bogus/instance_methods.rb
bogus-0.0.3 lib/bogus/instance_methods.rb
bogus-0.0.3.rc.2 lib/bogus/instance_methods.rb