Class: Olelo::PatchParser::Handler

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/olelo/patch.rb

Direct Known Subclasses

ChangeHandler, Olelo::PatchSummary

Instance Method Summary collapse

Methods included from Util

#check, #decode64, #deep_copy, #encode64, #escape, #escape_html, #escape_javascript, included, #md5, #no_cache?, #sha256, #titlecase, #truncate, #unescape, #unescape_backslash, #unescape_html, #valid_xml_chars?

Instance Method Details

#begin!(src, dst) ⇒ Object



14
15
# File 'lib/olelo/patch.rb', line 14

def begin!(src, dst)
end

#binary!Object



20
21
# File 'lib/olelo/patch.rb', line 20

def binary!
end

#context!(line) ⇒ Object



38
39
# File 'lib/olelo/patch.rb', line 38

def context!(line)
end

#deleted!Object



23
24
# File 'lib/olelo/patch.rb', line 23

def deleted!
end

#deletion!(line) ⇒ Object



35
36
# File 'lib/olelo/patch.rb', line 35

def deletion!(line)
end

#end!Object



17
18
# File 'lib/olelo/patch.rb', line 17

def end!
end

#finalize!Object



11
12
# File 'lib/olelo/patch.rb', line 11

def finalize!
end

#initialize!Object



8
9
# File 'lib/olelo/patch.rb', line 8

def initialize!
end

#insertion!(line) ⇒ Object



32
33
# File 'lib/olelo/patch.rb', line 32

def insertion!(line)
end

#line!(line) ⇒ Object



41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/olelo/patch.rb', line 41

def line!(line)
  case line[0..0]
  when '@'
    separator!
  when '+'
    insertion!(line[1..-1])
  when '-'
    deletion!(line[1..-1])
  else
    context!(line[1..-1])
  end
end

#no_changes!Object



26
27
# File 'lib/olelo/patch.rb', line 26

def no_changes!
end

#separator!Object



29
30
# File 'lib/olelo/patch.rb', line 29

def separator!
end