Class: Bogus::InstanceMethods

Inherits:
Object
  • Object
show all
Extended by:
Takes
Defined in:
lib/bogus/fakes/instance_methods.rb

Instance Method Summary collapse

Methods included from Takes

takes

Instance Method Details

#allObject



6
7
8
# File 'lib/bogus/fakes/instance_methods.rb', line 6

def all
  klass.instance_methods - Object.instance_methods
end

#define(body) ⇒ Object



18
19
20
# File 'lib/bogus/fakes/instance_methods.rb', line 18

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

#get(name) ⇒ Object



10
11
12
# File 'lib/bogus/fakes/instance_methods.rb', line 10

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

#remove(name) ⇒ Object



14
15
16
# File 'lib/bogus/fakes/instance_methods.rb', line 14

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