/
object_defintion_events.rb
45 lines (38 loc) · 1.2 KB
/
object_defintion_events.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
require File.dirname(__FILE__) + "/object_defintion_event.rb"
module InspectorGadget
class ClassEdit < ObjectDefinitionEvent
def self.description
"Editing class #{@args[:klass]} in #{location}\n"
end
end
class ModuleEdit < ObjectDefinitionEvent
def self.description
"Editing module #{@args[:module]} in #{location}\n"
end
end
class SingletonMethodAdded < ObjectDefinitionEvent
def self.description
"Added singleton method #{@args[:method]} to #{@args[:klass]} in #{location}\n"
end
end
class FeaturesAppended < ObjectDefinitionEvent
def self.description
"Included module #{@args[:module]} into #{@args[:klass]}\ in #{location}\n"
end
end
class MethodAdded < ObjectDefinitionEvent
def self.description
"Added method #{@args[:method] } to #{IG.real_to_s(@args[:object])} in #{location}\n"
end
end
class MethodAliased < ObjectDefinitionEvent
def self.description
"Aliased method #{@args[:new_method]} to #{@args[:old_method]} in #{location}\n"
end
end
class ConstantSet < ObjectDefinitionEvent
def self.description
"Dynamically defined constant #{@args[:constant]} in #{location}\n"
end
end
end