Class: Archimate::Diff::Delete
Constant Summary
Constants inherited
from Difference
Archimate::Diff::Difference::ARRAY_RE, Archimate::Diff::Difference::PATH_ROOT_SORT_ORDER
Instance Attribute Summary
Attributes inherited from Difference
#changed_from, #target
Instance Method Summary
collapse
Methods inherited from Difference
#<=>, #==, #change?, #insert?, #move?, #path_to_array, #summary_element
Constructor Details
#initialize(target) ⇒ Delete
Create a new Delete difference
11
12
13
|
# File 'lib/archimate/diff/delete.rb', line 11
def initialize(target)
super
end
|
Instance Method Details
#apply(el) ⇒ Object
21
22
23
24
|
# File 'lib/archimate/diff/delete.rb', line 21
def apply(el)
target.delete(el)
el
end
|
#delete? ⇒ Boolean
26
27
28
|
# File 'lib/archimate/diff/delete.rb', line 26
def delete?
true
end
|
#kind ⇒ Object
30
31
32
|
# File 'lib/archimate/diff/delete.rb', line 30
def kind
"Delete"
end
|
#to_s ⇒ Object
15
16
17
18
19
|
# File 'lib/archimate/diff/delete.rb', line 15
def to_s
"#{diff_type} #{target} from #{target.parent.to_s}"
end
|