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
|
# File 'lib/watch_tower/editor/base_ps.rb', line 11
def self.included(base)
base.class_eval <<-END, __FILE__, __LINE__ + 1
# Returns the name of the editor
#
# Child class should implement this method
def name
raise NotImplementedError, "Please define this function in your class."
end
# Returns the version of the editor
#
# Child class should implement this method
def version
raise NotImplementedError, "Please define this function in your class."
end
# The editor's name for the log
# Child classes can overwrite this method
#
# @return [String]
def to_s
"\#{self.class.to_s.split('::').last} Editor Version \#{version}"
end
END
end
|