Class: Bogus::ClassMethods
- Inherits:
-
Object
- Object
- Bogus::ClassMethods
- Extended by:
- Takes
- Defined in:
- lib/bogus/fakes/class_methods.rb
Instance Method Summary collapse
Methods included from Takes
Instance Method Details
#all ⇒ Object
6 7 8 |
# File 'lib/bogus/fakes/class_methods.rb', line 6 def all klass.methods - Class.methods - bogus_methods end |
#define(body) ⇒ Object
18 19 20 |
# File 'lib/bogus/fakes/class_methods.rb', line 18 def define(body) klass.instance_eval(body) end |
#get(name) ⇒ Object
10 11 12 |
# File 'lib/bogus/fakes/class_methods.rb', line 10 def get(name) klass.method(name) end |
#remove(name) ⇒ Object
14 15 16 |
# File 'lib/bogus/fakes/class_methods.rb', line 14 def remove(name) klass.instance_eval "undef #{name}" end |